Jump to content

Rebooting while processing RunOnceEx entries


Recommended Posts

I've seen multiple posts about rebooting during the processing of RunOnceEx entries but none seem to address the issue I have.

Like [just about] everyone else, I have a .cmd file in cmdlines.txt that creates the RunOnceEx registry entries. Via cmdlines.txt I also create an admin user account with autologon. Thus at the end of the XP Pro installation the user will be logged on and the RunOnceEx entries (application installs) processed. The list of entries I have in RunOnceEx is now pretty large (>70) and most of them drop off the bottom of the screen. I've proven an approach that writes ~30 entries into the subkeys of HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx with the remaining entries being placed in ..\RunOnceExtra. The final entry in RunOnceEx executes a small AutoIt script that moves up to 30 entries from RunOnceExtra to RunOnceEx and then reboots. All this works just fine; I see the entries being processed in the visibile 'Installing Applications' window, and my 70+ apps are installed over multiple reboots.

So "what's the problem?" you may well ask. Well, during one or more reboots I see the 'Personalized Settings' window pop up briefly, occasionally with a message about running a .dll having failed as Windows is shutting down. The net effect of this being that when all the RunOnceEx processing is complete I find that things like the Themes Setup have not been run (presumably that was the .dll that failed) and I have a clunky looking Win2K / 'classic' desktop.

What I'd like to find out is what launches the 'Personalized Settings' window and is there a way of holding back the execution of this phase until after all my RunOnceEx etries have been processed? Failing that, can I somehow 're-lauch' the tasks that are normally executed as part of the 'Personalized Settings' phase?

FYI - this problem has nothing whatsoever to do with my use of RunOnceExtra -> RunOnceEx. If I put several shutdown -r -f -t 0 commands in my regular RunOnceEx entries I get exactly the same problem with the 'Personalized Settings' window.

AdvThanksance

Vumad

Edited by Vumad
Link to comment
Share on other sites


yep, but there's another way to do this!

put a batch file to run and make it reboot the computer (I forgot the command line now, but I can post it here) in 0 or 1 second, so it will reboot and when it starts it will just continue doing the tasks later than the "Reboot task". It works for me...

Link to comment
Share on other sites

Thanks Nilfred (and apologies for being a newbie ;) )

Do I place

start /w rundll32.exe iernonce.dll,RunOnceExProcess

as my final RunOnceEx entry or elsewhere in the first start-up / login sequence?

Vumad

Link to comment
Share on other sites

Brilliant - I take my hat off to you Nilfred - this does exactly what I was trying to achieve. It works great with my RunOnceExtra approach.

... but back to the original subject. I have one application (so far) that does indeed require a re-boot during the installation process - Alcohol 120%. So the original problem still exists, ie is it possible to re-boot during the processing of the RunOnceEx entries and not screw up the 'Personalized Settings' phase of the first logon?

Thanks again for the help,

Vumad

Link to comment
Share on other sites

@Vumad

create a batch (.bat) file with this:

@echo off
program-to-run.exe
pause
EXIT

with this you can install the program and reboot the PC, so when your computer start it will continue the RunOnceExec bypassing this item, ok???

it works for me, but I think you can install it without having to reboot the computer, and when everything's done, you put a final item to reboot tghe PC and then ALL DONE!

Link to comment
Share on other sites

Many thanks victor_008 and dobbelina

dobbelina - excuse my 'newbieness' but the installation of the 'SCSI Pass Through Direct driver' mentions Install this file @ T-13/12/9 - how do these stages map onto cmdlines.txt, svcpack.inf, etc

victor_008 - thanks for the suggestion, but belive you me I've tried this and many other 'incantations'. The problem is not one of re-booting during RunOnceEx, nor resuming from the next entry, all that works just fine. The issue I have is that a re-boot adversely affects the running of 'Personalized Settings' which executes after the final RunOnceEx entry has completed.

Cheers guys,

Vumad

Link to comment
Share on other sites

T-13, svcpack.inf, T-12, cmdlines.txt (registering components), T-9 can't remember.

T-xx is where xx is how much time is left for windows setup to finish.

So when it sez "39 mins remaining" it's T-39.

You install the SPTD layer via svcpack.inf and it will reboot, then you can install alcohol or daemon tools silently.

Download this http://myweb.tiscali.co.uk/earlybus/TD_SPTD_Addon.cab

Integrate in nLite or RVM and instal alcohol/daemon tools silently via guirunonce or runonceex :D

Edited by T D
Link to comment
Share on other sites

**** newbies!

No need to reboot for that, just rerun the RunOnceEx process again:

start /w rundll32.exe iernonce.dll,RunOnceExProcess

Ok dude.. Help. :lol:

Could you provide a demo-structure of how to do it (from the cmdlines.txt file to the final file) so I could learn from that?

I've been trying nonstop, and I always encounter some sort of fluke in what I am going for.

For example, it either skips newly imported ROE's (RunOnceEx's), has overlapping ROE windows, etc.

TIA.

Link to comment
Share on other sites

  • 2 weeks later...

The re-running of RunOnceEx is working fine for me following the advice from Nilfred

My 'cmdlines.txt' statements looks like:

.
.
Reg Add %ExtraKey%\062 /ve /d "PartitionMagic v8.05" /f
Reg Add %ExtraKey%\062 /v 1 /d "\"%SystemDrive%\Apps\PartitionMagic\PartitionMagic.aai\"" /f

Reg Add %ExtraKey%\063 /ve /d "nLite v1.0.1" /f
Reg Add %ExtraKey%\063 /v 1 /d "\"%SystemDrive%\Apps\nLite\nLite.aai\"" /f

Reg Add %Key%\999 /v 1 /d "\"%SystemRoot%\System32\RunOnceEx.exe\" MOVE_EXTRA RUNONCEEX" /f

Reg Add %ExtraKey% /v ThisPass /d "2" /f
Reg Add %ExtraKey% /v LastPass /d "2" /f
Reg Add %ExtraKey% /v Title /d "Installing Applications" /f
Reg Add %ExtraKey% /v MaxEntries /d "32" /f

where RunOnceEx.exe is a small app created with AutoIt that given the appropriate parameters moves the entries from HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExtra to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx, installs itself as entry 999 in the RunOnceEx keys and then executes

RunWait(@SystemRoot & "\rundll32.exe iernonce.dll,RunOnceExProcess")

After all this I'm still none the wiser about actually re-booted during RunOnceEx processing but that requirement has now 'gone away' following the tips about running iernonce.dll and the SCSI Pass Through Direct driver

Vumad

Link to comment
Share on other sites

After all this I'm still none the wiser about actually re-booted during RunOnceEx processing but that requirement has now 'gone away' following the tips about running iernonce.dll and the SCSI Pass Through Direct driver

Vumad

Oops :blushing:
;HKLM,"%RunOnceEx%\999",,,"Hardware reboot"
;HKLM,"%RunOnceEx%\999",1,,"%11%\shutdown.exe -r -f -t 2 -c """%ShutdownMsg%"""
[Strings]
RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
ShutdownMsg = "Windows XP will restart in 1 second..."

Link to comment
Share on other sites

  • 5 years later...

Even though this post is almost 6 years old I still found it and had the same problem (but with Win7).

My RunOnceEx process contains a bunch of reboot command, and the only reliable way of doing it for me was to:

  1. Add Flags = 0x3 (run synchronous and delete entry after run)
  2. And then run shutdown command that also kills the RunOnceEx process

The shutdown command is crucial since if shutdown process exits the next item on the RunOnceEx list will be processed and interruped in the middle of an item, since a shutdown is in progress.

The solution I found was to execute a kill command of the RunOnceEx process and then shutting down Windows. That's the only reliable way of doing it. One would think that just executing shudown and then pausing:

shutdown /r /t 0 /f & pause

would also do the trick. But noo. If Windows terminates the shell that executes that command before the RunOnceEx process, then it will stop waiting for the process to finish (since it was killed) and continue to the next.

Bottom line, kill it first and then shut down:

taskkill /im rundll32.exe /f & shutdown /r /t 0 /f 

Since it needs to be run in a shell the RunOnceEx entry will look something like this:

REG ADD %KEY%\001 /V 1 /D "cmd /k taskkill.exe /im rundll32.exe /f & shutdown /r /f /t 0" /f

In XP the taskkill might not be available, try tskill instead.

I've seen multiple posts about rebooting during the processing of RunOnceEx entries but none seem to address the issue I have.

Like [just about] everyone else, I have a .cmd file in cmdlines.txt that creates the RunOnceEx registry entries. Via cmdlines.txt I also create an admin user account with autologon. Thus at the end of the XP Pro installation the user will be logged on and the RunOnceEx entries (application installs) processed. The list of entries I have in RunOnceEx is now pretty large (>70) and most of them drop off the bottom of the screen. I've proven an approach that writes ~30 entries into the subkeys of HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx with the remaining entries being placed in ..\RunOnceExtra. The final entry in RunOnceEx executes a small AutoIt script that moves up to 30 entries from RunOnceExtra to RunOnceEx and then reboots. All this works just fine; I see the entries being processed in the visibile 'Installing Applications' window, and my 70+ apps are installed over multiple reboots.

So "what's the problem?" you may well ask. Well, during one or more reboots I see the 'Personalized Settings' window pop up briefly, occasionally with a message about running a .dll having failed as Windows is shutting down. The net effect of this being that when all the RunOnceEx processing is complete I find that things like the Themes Setup have not been run (presumably that was the .dll that failed) and I have a clunky looking Win2K / 'classic' desktop.

What I'd like to find out is what launches the 'Personalized Settings' window and is there a way of holding back the execution of this phase until after all my RunOnceEx etries have been processed? Failing that, can I somehow 're-lauch' the tasks that are normally executed as part of the 'Personalized Settings' phase?

FYI - this problem has nothing whatsoever to do with my use of RunOnceExtra -> RunOnceEx. If I put several shutdown -r -f -t 0 commands in my regular RunOnceEx entries I get exactly the same problem with the 'Personalized Settings' window.

AdvThanksance

Vumad

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...