Archive: Delaying app startup after reboot


Delaying app startup after reboot
Hi everyone.

I'm using NSIS 2.03 and I'm testing on Windows 98. My installation will create a new MSDE2000 instance, then reboot the PC and after the user logs on it will continue to perform database actions (once the server is active).

The MSDE installation and reboot goes fine. My problem is this: After the user logs in, the installation almost immediately starts to run. Barely enough time elapses for the system to reconfigure it self and to start the MSDE Server. I need for the installation to start running after all other services has started on the machine.

I thought about creating a loop and waiting for the MSDE process to become active, but the installation keeps all the background services from starting up. I've looked at the registry entries in MSDN but there isn't pointers on how to delay app start-ups in the RunOnceEx or RunOnce description. Scouring these forums topics haven't met with success yet.

One of the threads suggested an app called "Nopey" (it has a feature to sleep a process for x ms), but the URL there only produced a 404 error.

Has anyone dealt with a similar situation before? Can anyone point me in a direction?


Instead of a loop, you can try executing the installer again and exiting the current installer. This way, the other services won't be blocked. Not the prettiest way, but should work.


thanks
Thanks, KiCHik. Although that is a bit inelegant it does the trick. You've just got to not package files inside the installer otherwise the user sees "verifying installer... xx%" twice!

In the end I write a flag somewhere, reboot the machine, check for the flag, set the flag to a new value, start another instance and quit the current one.
The second instance reads the flag again and pauses itself for x seconds.