Jump to content
Sign in to follow this  
streetwolf

Noob needs a little help

Recommended Posts

streetwolf

I need to run a service when Windows comes up but I need to wait about 10 seconds in order to let another service start first otherwise I get a BSOD. I also need to automatically press ENTER to a warning message that the program produces and is not needed.

I came up with this:

sleep(10000)

Run ( 'net start asdr' )

WinWait ( 'Warning' )

Send ( '{ENTER}' )

It works fine except that the 'net start asdr' brings up a DOS box. I would like to have that DOS box not displayed if possible. I tried adding @sw_hide but all that did is pause the script.

Any help to accomplish my needs will be greatly appreciated.

Share this post


Link to post
Share on other sites
Beege

What do you mean @sw_hide paused the script? Did the service ever start?

Run('net start asdr','',@sw_hide)

Share this post


Link to post
Share on other sites
streetwolf

OK, i forgot the " " before the @sw_hide. Now it works, thanks

Edited by streetwolf

Share this post


Link to post
Share on other sites
Beege

The service didn't start and the AutoIt icon was in the tray with Pause checked. Perhaps I coded it incorrectly.

The icon pause only happens if you click the icon. It will never pause itself. If theres something wrong with the script it will most likly crash and exit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.