Jump to content

Recommended Posts

Posted

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.

Posted

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

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

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.

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
×
×
  • Create New...