Jump to content

Old unresolved problem with multiple RunOnceEx


Recommended Posts

I still have some little problems with my unattended "project".

I'm not totally noob on the matter as in the past I've already created a WinXp Pro CD with applications installed by a single RunOnceEx. I have then tested it for a year without big errors.

Now, I'd like to make a WinXp Pro DVD plus programs installed with multiple RunOnceEx (each cmd file reboots the system at the end and calls the next)

What I'm asking: is there a way to run all RunOnceEx lists with multiple reboots and load the desktop only at the end?

Currenty happens that the desktop (tray+icons+settings) is loaded at first reboot, while I'd like to maintain the blue empty desktop behind all the lists.

Err.. it's hard to explain exactly, I'll add more info plus a picture if needed

Link to comment
Share on other sites


Thank you for your answer darksimoon. Unfortunately however, your Runonceexes only call themselves but don't seem to reboot machine at each end.

I need to restart the computer to let some programs finish their setups and also to defragment better.

I'll post some of my files so you can see what I mean (the last A and B don' restart though)

During setup, after the first file i see a window that says something like: "loading settings" then desktop and tray appears. I'd like to make that happen only after last runonceex list so it doesn't mess with other installations (plus more professional appearance)

p.s: if I set reboot to 0 instead of 10 seconds, the "loading settings" procedure is badly interrupted.. not good I think

paorunonceexes.zip

Edited by phaolo
Link to comment
Share on other sites

The runonceex resumes where it left off, why would you need multiples? I install .net3.5 with a /forcerestart, so dependent apps have it available, and it reboots and picks up where it left off. Increment the autologon in the .sif by 1 for each reboot.

Link to comment
Share on other sites

In the old cd I had only one runoncex with one reboot at end, but it was really uncomfortable (and messy).

Now I prefer multiples for:

-keeping max 18 entries so list doesn't go out of screen

-easier managing of entries and reboots

-different types to add custom menu setup (for example with\without drivers). Still need to work on it though

Anyway the problem here is NOT the existance of multiples lists but instead only the first reboot!

All is working good except for the previous problem. I've already incremented the autologon, then, thanks

Edited by phaolo
Link to comment
Share on other sites

hello phaolo ;

i'm not sure how its done exactly but why dont you add "shutdown -t 5" command in the runonceex where you want it to reboot or in the software's *.bat file that includes setup parameters ? i think you can manage this issue this way.

Link to comment
Share on other sites

Uh what do you mean? If you see my files I'm currently using:

shutdown.exe -r -t 10 -c \"Windows XP will now restart in 10 seconds...\"

This prevents the "loading setting" interruption, but doesn't avoid it till the last runonceex as I'd like to do

Link to comment
Share on other sites

I don't have any experience with multiple RunOnceEx runs i must admit(only one), but cant you not just as the last entry in each runonceex(n).cmd set the next runonceex(n).cmd to run and then have a reboot without any 5 secs pause as the last line in each runonceex(n).cmd except the first ?

Edited by Martin H
Link to comment
Share on other sites

Uh probably I didn't manage to explain my problem. Sorry it's hard to do it, expecially in another language.

I don't understand your suggestion Martin. There's no point in removing the pause in the other batch files as the problem is not related to that.

The only trouble is that Windows loads the desktop when the first runonceex is finished. I've tried to "pause" the process but shutdown closes it anyway. A somewhat solution could be stopping the desktop until I need or a method to leave runonceex open before rebooting.

I'd like an empty blue background until all the programs have been installed after the required reboots. Only after all, desktop and settings can be loaded (or maybe is not possible?).

Edited by phaolo
Link to comment
Share on other sites

Mm I try to change the question so maybe it will be more clear. Anyway thanks to the previous posters for the effort.

Question:

Even with one RunOnceEx, how can you reboot many times the machine during unattended setup and keep the blue empty desktop in the background until the end?

Edited by phaolo
Link to comment
Share on other sites

If there are keys remaining in the runonceex it will resume from reboot (to the same blue screen and progress box) and finish.

the following lines would install dotnet -- reboot -- resume and install wmp11 -- only displaying the desktop after the final key is ran.

REG ADD %REGKEY%\001 /VE /D "installing dot net 3.5" /f

REG ADD %REGKEY%\001 /v 1 /D "d:\source\DOTNET35\dotnet35.exe /q /forcerestart" /f

REG ADD %REGKEY%\009 /VE /D "Installing Windows Media Player 11" /f

REG ADD %REGKEY%\009 /v 9 /D "d:\source\WMP11\wmp11.exe /Q:A" /f

REG ADD %REGKEY%\009 /v 10 /D "d:\source\WMP11\KB954154.exe /passive /norestart" /f

Link to comment
Share on other sites

Yee that's useful :)

However I'm puzzled why my method doesn't work as I keep RunOnceEx open with this last line: hidcon.exe %COMSPEC% /c pause

Maybe I should just add another empty line after the pause. I'll test it, thanks iamthekey :lol:

p.s: I prefer to use shutdown so I can freely manage the restarts

Edited by phaolo
Link to comment
Share on other sites

this is what i'm using:

RunOnceEx.cmd (called by cmdlines.txt):

cmdow @ /HID
@echo off

SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /v "Title" /d "Installation von Anwendungen" /f

REG ADD %KEY%\001 /ve /d "Windows Messenger" /f
REG ADD %KEY%\001 /v "01" /d "%SYSTEMROOT%\system32\net.exe use T: \\DATA\RIS password /user:username" /f
REG ADD %KEY%\001 /v "02" /d "%SYSTEMROOT%\system32\rundll32.exe advpack.dll,LaunchINFSection %SYSTEMROOT%\INF\msmsgs.inf,BLC.Remove,5" /f

REG ADD %KEY%\005 /ve /d ".NET Framework" /f
REG ADD %KEY%\005 /v "01" /d "T:\x86\source\public\NETFramework35ServicePack1.exe /quiet /norestart" /f

REG ADD %KEY%\010 /ve /d "Windows Media Player" /f
REG ADD %KEY%\010 /v "01" /d "T:\x86\source\public\WindowsMediaPlayer11.exe /Q" /f

REG ADD %KEY%\015 /ve /d "Internet Explorer" /f
REG ADD %KEY%\015 /v "01" /d "T:\x86\source\public\InternetExplorer7.exe /quiet /update-no /nobackup /norestart" /f
REG ADD %KEY%\015 /v "02" /d "T:\x86\xp_pro\scripts\internal\%COMPUTERNAME%\RunOnceEx1.cmd" /f
REG ADD %KEY%\015 /v "03" /d "%SYSTEMROOT%\system32\shutdown.exe -r -t 0" /f

EXIT

RunOnceEx1.cmd (called by RunOnceEx.cmd):

cmdow @ /HID
@echo off

SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /v "Title" /d "Installation von Anwendungen" /f

REG ADD %KEY%\020 /ve /d "Apple QuickTime" /f
REG ADD %KEY%\020 /v "01" /d "%SYSTEMROOT%\system32\net.exe use T: \\DATA\RIS password /user:username" /f
REG ADD %KEY%\020 /v "02" /d "T:\x86\source\public\AppleQuicktime75.exe /quiet /norestart" /f

REG ADD %KEY%\025 /ve /d "Adobe Acrobat Reader" /f
REG ADD %KEY%\025 /v "01" /d "T:\x86\source\public\AdobeAcrobat9Reader.exe /sAll" /f

REG ADD %KEY%\030 /ve /d "Adobe Flash Player" /f
REG ADD %KEY%\030 /v "01" /d "T:\x86\source\public\AdobeFlashPlayer10.msi /quiet /norestart" /f

REG ADD %KEY%\035 /ve /d "WinZip" /f
REG ADD %KEY%\035 /v "01" /d "T:\x86\source\public\WinZip111.msi /quiet /norestart" /f

REG ADD %KEY%\040 /ve /d "WinRAR" /f
REG ADD %KEY%\040 /v "01" /d "T:\x86\source\public\WinRAR380.exe /s" /f
REG ADD %KEY%\040 /v "02" /d "%SYSTEMROOT%\system32\shutdown.exe -r -t 0" /f

EXIT

shutdown.exe is official microsoft tool. in RunOnceEx.cmd i call shutdown to reboot instead of using the ie7setup since "shutdown -r -t 0" is a save reboot, ie7setup not!

Edited by an3k
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...