Simon
Simon

Reputation: 321

Restart Setup after reboot

We have a custom setup engine (written in C#) that needs to continue the installation after a reboot, because the .NET Framework 4.0 setup requires this.

The RunOnce Registry Key cannot be used, as Windows blocks applications that require administrator rights. When we use the Run Key, a balloon message pops up that indicates that windows has blocked the application. We you click on the ballon you can start the application regardless, but that is not suitable for a business application.

Are there any other ways we could solve this problem?

//edit: The RunOnce key works, but you have to make sure that it is created under the HKEY_CURRENT_USER of the current user.

Thanks a lot, Simon

Upvotes: 0

Views: 1529

Answers (2)

Simon
Simon

Reputation: 321

The RunOnce Key seems to work. I think that the tester that looked into the matter created the Key under HKEY_LOCAL_MACHINE, which doesn't work because the RunOnce key is only executed when the program has the right to remove itself from the entry. (Which is not the case when you use HKEY_LOCAL_MACHINE when logged in using a standard user account). Thank you!

Upvotes: 4

Otiel
Otiel

Reputation: 18743

If you can't access the registry for any reason, you could create a shortcut of your setup in the Startup folder, and delete it as soon as your setup is finished (you don't want it to run at the next reboot).

Upvotes: 0

Related Questions