Jump to content

RunOnceEx and reboots


Recommended Posts


I have some applications I want to put in a RunOnceEx script, but some of them need to reboot before I can install something else.

Is there a way I can reboot and pick up where I left ?

Or is there another way ?

Try it with Windows Unattended CD Creator. It supported multireboot!

http://www.vitaligraf.de/WUCDCreatorSetup-0.9.8.exe

VideoTutorial:

http://www.vitaligraf.de/video/tutorial.divx521.avi

Edited by LostGhost
Link to comment
Share on other sites

True... I

have a 3 part roe sequeunce.. install drivers, then reboot, and it carries on with whatever came next in original lisit... I then install apps and finally a new list for regtweaks (which avoids having one huge list of installs)

Link to comment
Share on other sites

Just a quick cmd file call it reboot.cmd will do & call it after the last app you installed prior to the reboot you need in runonceex.

CLS
@echo off
ECHO.
ECHO Restarting the PC in approx...Ten Seconds....
psshutdown.exe -r -t 10 -f -m "Windows XP will now restart in Ten Seconds,now rebooting!"
EXIT

Cheers

MC. :thumbup

ps.You will of course need psshutdown.exe a simple search & DL will procure that for you tho.

Edited by MAVERICKS CHOICE
Link to comment
Share on other sites

  • 1 year later...

I bump this topic since I'm experimenting an issue when rebooting at the RunOnceEx stage.

I've properly setup the needed entries into the Registry in order to run my tasks, and the last task is the reboot.

Okay, you know Windows runs some tasks in the First Run after the user logs on, in order to configure Desktop, Internet Explorer, Themes Setup, and so on. When the reboot begins, I notice Windows WANTS to launch the tasks I've mentioned (configure Desktop, Internet Explorer, Themes Setup, i.e., the First Run), but the reboot takes place and all tasks are FORCED to stop and close, producing the appearing (sometimes) of an Error message box with the following text (more or less):

'DLL initialization error: Application failed to initialize because the application window was closed...'. Sometimes, a blank message box appears with the following title 'Custom Settings'. Both boxes disappears in less than 1 second, but this issue generates an error in the Event Viewer with the Source name "Application Popup".

If I remove the reboot process in the RunOnceEx stage, these errors are NOT generated (checked), but a reboot is necessary because I install programs which require it.

I think the reboot task is not suitable if the "First Run" tasks are scheduled to launch AFTER the RunOnceEx keys are processed (and Windows always do this, check it out). My question is:

Is there any way to avoid "The First Run" tasks the first time the user logs on to the system, then in the RunOnceEx stage prepare the Registry (or whatever) in order to schedule these tasks for the SECOND logon and finally reboot the system. In this way, Windows would not be forced to shutdown in an unpolite way.

Any ideas? Anyone has been experimenting this issue? I'm using Windows XP SP2 Pro with latest hotfixes integrated with nLite (the RunOnceEx stage is configured by me).

Thanks for any answer to this hard question, I know :)

PD: I'm using the UnattendSwitch=Yes directive in WINNT.SIF, so no OOBE is launched after Windows is installed. The RunOnceEx stage runs immediately.

EDIT: I have found the Registry key corresponding to these components (Desktop, Themes Setup, ...). It is:

HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components

Any way to prevent this run?

Edited by ponghy
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...