cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JohnWu
Level 3

Autorun program when Windows boots up and UAC is on

Hi everyone,

Here's my question. I want to have the application program to be able to autorun when Windows boots up and UAC is on. Is it possible to do this with InstallShield? Or is this can be only done in the application program?
Any comment or suggestion is appreciated. Thank you.

John
Labels (1)
0 Kudos
(2) Replies
JohnWu
Level 3

Hi everyone,

I've found out that in order to make this to work, I need to modify the manifest for the program exe file. In the manifest, I have to change the setting of "requestedExecutionLevel" from "requireAdministrator" to "asInvoker". Unfortunately, this change causes side effects to the program.

I've also found out that user can change some settings in Task Scheduler to make it working. However, we don't want users to change their systems to make our product working. So my question is that is there anyway I can make an InstallShield project to change the settings in Task Scheduler?

Any comment or suggestion is appreciated. Thank you.

John
0 Kudos
MSIYER
Level 8

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

An entry here can autostart any app during a boot.
But one needs admin privileges during install to write there.

This may not work if a standard user account is used to logon after a reboot. I think, an app with "requireAdministrator" in manifest will not start after reboot for any user account.

I've found out that in order to make this to work, I need to modify the manifest for the program exe file. In the manifest, I have to change the setting of "requestedExecutionLevel" from "requireAdministrator" to "asInvoker". Unfortunately, this change causes side effects to the program.

Just adding a manifest with "asInvoker" will not be enough. "asInvoker" manifest will work fine when coupled with the above method. Even a standard user account will be able to launch the app after reboot. But if your app needs admin rights, this will not work.

Unfortunately, this change causes side effects to the program.

You may need to refactor code for UAC compliance. I do not think there are acceptable workarounds.
0 Kudos