简体   繁体   中英

Programatic launching of application on windows startup

I have a particular piece of software that i wish to load on windows startup. Under normal circumstances i would simply place a shortcut in the startup folder or an entry in the run key in the registry.

Unfortunately and for an unknown reason this application throws a win32 execption whenever that is done - and i am assuming it is because an element of windows has not been loaded that is vital to this application.

Once windows has actually loaded i can double click on the icon and it runs fine. So my question is - is there a programmatic solution to this? I have already tried a console app launcher that sleeps for n seconds and then launches but all that seems to do is delay the startup of windows.

Does anyone have any creative solutions? I am open to anything from a windows service to c#, vb, batch files.. etc

Thx

Have a look at AUTOEXEC.BAT. But be careful!!

Can you run it as a service, or write a shell service which will attempt to start it up? That way you will have built in support for response on failure and delay time before trying again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM