Why do some installers need to restart the computer before you run the program?
Asked Answered
L

3

9

I'm fairly new to deploying desktop applications, so this is the first time I'm building an installer for my software. Currently, the first time I run my software after installing it, it crashes. After that, it runs fine. I'm still in the process of debugging this issue, but I've noticed that a reboot immediately after installing and before running the software seems to fix this crash.

What are common reasons that some installers ask you to reboot before running the software?

Also, why do some installers need to restart before finishing the installation?

Thanks in advance!

Livvyy answered 26/10, 2008 at 2:41 Comment(1)
This article may help to find why the reboot was required by the installer: itayhauptman.wordpress.com/2016/05/30/…Legit
R
8

Generally, reboots between install and running are because you're replacing system DLLs that are locked. The installer sets up a run-once registry entry that copies the DLLs during boot before they're locked by Windows, and then your application can use the new DLL that you laid down.

In general, this is highly discouraged. There should be no reason anymore for anyone other than Windows itself to need to reboot after install anymore.

I'd suggest going back into a debugger to find out more details about why your application is crashing. Hopefully you have enough tracing available in your code to allow that type of debugging.

Reichenberg answered 26/10, 2008 at 2:45 Comment(0)
C
1

In general, a reboot is only required if the installer needs to replace files that are currently in use (and locked) by the OS. Sometimes installers will err on the side of reboot-just-in-case, but this is rarer than it used to be.

Cosma answered 26/10, 2008 at 2:44 Comment(0)
C
0

We've got a case with an installer I maintain where we need to force a reboot for vista only due to UAC and privilege elevation. Once the setup is complete we need to trigger a program as the current user context, not the elevated Vista context.

In your case, I suspect that some files haven't been correctly registered and you just need to stick with the debugging ;)

Cannery answered 27/10, 2008 at 2:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.