Jump to content

RunOnceEx on reboot


Recommended Posts


Hi.

I think you should read this thread: IE7 RunOnceEx problem solved! Finally!, Yes, you can install IE 7 and its Hotfixes via RunOnceEx!. There you should find the right method to solve your problem. Post No.58 is decribing working solution.

If that thread is not speaking about your problem, try to be more specific when you describe your issues.

Edited by Muki
Link to comment
Share on other sites

So as I think you want to have two seasons of RunOnceEx. The first season runs OK at the very first boot after system installation. But you want to reboot your PC one more time and second RunOnceEx season never runs. Am I correct? If you install IE7 trough RunOnceEx, it breaks the second RunOnceEx season at next boot. If you are doing this, the workaroud is in link I've posted before.

Or, pleas, post here the most important parts of your installation files.

Link to comment
Share on other sites

Yes that is what I want but I am not trying to install IE7, they are just normal programs. On the first login I want to install some programs then let the computer restart and on the second login install some more programs.

Link to comment
Share on other sites

try this :

RunOnceEx.cmd
------------------
FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\XP_SP2.CD SET CDROM=%%i:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Apps" /f
REG ADD %KEY%01 /VE /D "Installing ..." /f
REG ADD %KEY%01 /V 1 /D "%CDROM%\...." /f
REG ADD %KEY%02 /VE /D "Execute RunOnceEx2 in the next restart" /f
REG ADD %KEY%02 /V 1 /D "%CDROM%\RunOnceEx2.cmd" /f
shutdown.exe -r -f -t 60 -c "Restart to execute RunOnceEx2.cmd.."
EXIT

RunOnceEx2.cmd
------------------
FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\XP_SP2.CD SET CDROM=%%i:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Another set of installations..." /f
REG ADD %KEY%01 /VE /D "Installing..." /f
REG ADD %KEY%01 /V 1 /D "%CDROM%\..." /f
EXIT

Edited by rajesh.kumar
Link to comment
Share on other sites

Here is what I have so far and what is not working

cmdlines.txt

[COMMANDS]

"useraccounts.cmd"

"REGEDIT /S regtweaks.reg"

"RunOnceEx.cmd"

RunOnceEx.cmd

cmdow @ /HID

@echo off

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

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D ".Net FrameWork 1.1 & 2" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\DNF11_20.exe" /f

REG ADD %KEY%02 /VE /D "Restarting for the next go around of programs" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\restart.cmd" /f

REG ADD %KEY%03 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /f

EXIT

RunOnceEx2.cmd

cmdow @ /HID

@echo off

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

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%04 /VE /D ".Net FrameWork 3" /f

REG ADD %KEY%04 /V 1 /D "%systemdrive%\install\DNF30.exe" /f

REG ADD %KEY%05 /VE /D "rasphone.pbk" /f

REG ADD %KEY%05 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "modem initialization strings" /f

REG ADD %KEY%01 /V 1 /D "REGEDIT /S %systemdrive%\install\mistrngs.reg" /f

REG ADD %KEY%02 /VE /D "Java" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\jre6.exe" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "Thunderbird" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\Tb1.5.0.9.exe -ms" /f

REG ADD %KEY%02 /VE /D "Firefox" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\ff2.0.0.2.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "7-Zip" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\7z442.exe /S" /f

REG ADD %KEY%02 /VE /D "Winrar" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\wrar.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "MozBackup" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\MozBackup145.exe /VERYSILENT" /f

REG ADD %KEY%02 /VE /D "CCleaner" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\ccsetup137_basic.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "Perfectdisk" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\perfectdisk.exe" /f

REG ADD %KEY%02 /VE /D "Notepad++" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\npp.4.0.2.Installer.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Final restart and cleaning" /f

REG ADD %KEY%01 /VE /D "Cleaning up" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /f

EXIT

Link to comment
Share on other sites

try adding the following line to RunOnceEx.cmd after this line-(REG ADD %KEY%03 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /f) :

REG ADD %KEY%3 /V 2 /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f.

i dont know whether the way u r calling (the iernonce in many places in the same file) will work as u expected. if its not working, try to put each block in a separate cmd file and add the above line to each file accordingly.

Edited by rajesh.kumar
Link to comment
Share on other sites

I think the you must order this one:

RunOnceEx2.cmd

cmdow @ /HID

@echo off

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

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%04 /VE /D ".Net FrameWork 3" /f

REG ADD %KEY%04 /V 1 /D "%systemdrive%\install\DNF30.exe" /f

REG ADD %KEY%05 /VE /D "rasphone.pbk" /f

REG ADD %KEY%05 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "modem initialization strings" /f

REG ADD %KEY%01 /V 1 /D "REGEDIT /S %systemdrive%\install\mistrngs.reg" /f

REG ADD %KEY%02 /VE /D "Java" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\jre6.exe" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "Thunderbird" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\Tb1.5.0.9.exe -ms" /f

REG ADD %KEY%02 /VE /D "Firefox" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\ff2.0.0.2.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "7-Zip" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\7z442.exe /S" /f

REG ADD %KEY%02 /VE /D "Winrar" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\wrar.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "MozBackup" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\MozBackup145.exe /VERYSILENT" /f

REG ADD %KEY%02 /VE /D "CCleaner" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\ccsetup137_basic.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%01 /VE /D "Perfectdisk" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\perfectdisk.exe" /f

REG ADD %KEY%02 /VE /D "Notepad++" /f

REG ADD %KEY%02 /V 1 /D "%systemdrive%\install\npp.4.0.2.Installer.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Final restart and cleaning" /f

REG ADD %KEY%01 /VE /D "Cleaning up" /f

REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /f

EXIT

like this:

RunOnceEx2.cmd

cmdow @ /HID

@echo off

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

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%05 /VE /D ".Net FrameWork 3" /f

REG ADD %KEY%05 /V 1 /D "%systemdrive%\install\DNF30.exe" /f

REG ADD %KEY%10 /VE /D "rasphone.pbk" /f

REG ADD %KEY%10 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%13 /V TITLE /D "Installing Applications" /f

REG ADD %KEY%15 /VE /D "modem initialization strings" /f

REG ADD %KEY%15 /V 1 /D "REGEDIT /S %systemdrive%\install\mistrngs.reg" /f

REG ADD %KEY%20 /VE /D "Java" /f

REG ADD %KEY%20 /V 1 /D "%systemdrive%\install\jre6.exe" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%22 /V TITLE /D "Installing Applications" /f

REG ADD %KEY%25 /VE /D "Thunderbird" /f

REG ADD %KEY%25 /V 1 /D "%systemdrive%\install\Tb1.5.0.9.exe -ms" /f

REG ADD %KEY%30 /VE /D "Firefox" /f

REG ADD %KEY%30 /V 1 /D "%systemdrive%\install\ff2.0.0.2.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%32 /V TITLE /D "Installing Applications" /f

REG ADD %KEY%35 /VE /D "7-Zip" /f

REG ADD %KEY%35 /V 1 /D "%systemdrive%\install\7z442.exe /S" /f

REG ADD %KEY%40 /VE /D "Winrar" /f

REG ADD %KEY%40 /V 1 /D "%systemdrive%\install\wrar.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%42 /V TITLE /D "Installing Applications" /f

REG ADD %KEY%45 /VE /D "MozBackup" /f

REG ADD %KEY%45 /V 1 /D "%systemdrive%\install\MozBackup145.exe /VERYSILENT" /f

REG ADD %KEY%50 /VE /D "CCleaner" /f

REG ADD %KEY%50 /V 1 /D "%systemdrive%\install\ccsetup137_basic.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%52 /V TITLE /D "Installing Applications" /f

REG ADD %KEY%55 /VE /D "Perfectdisk" /f

REG ADD %KEY%55 /V 1 /D "%systemdrive%\install\perfectdisk.exe" /f

REG ADD %KEY%60 /VE /D "Notepad++" /f

REG ADD %KEY%60 /V 1 /D "%systemdrive%\install\npp.4.0.2.Installer.exe /S" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%62 /V TITLE /D "Final restart and cleaning" /f

REG ADD %KEY%65 /VE /D "Cleaning up" /f

REG ADD %KEY%60 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /f

EXIT

you can try :)

p.s:

i m not sure about that:

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%42 /V TITLE /D "Installing Applications" /f

you ve put it too times (maybe two are enought)

anyway i don't' think so that you ve to put /V TITLE

maybe it have to be something like this:

REG ADD %KEY%42 /VE /D "what you want" /f

REG ADD %KEY%42 /V 1 /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f

i m not sure about the last one because i don't use ie7, anyway you can try ^^

Edited by darafat
Link to comment
Share on other sites

try adding the following line to RunOnceEx.cmd after this line-(REG ADD %KEY%03 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /f) :

REG ADD %KEY%3 /V 2 /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f.

That did work but once the first RunOnceEx got finished it immediately tried to start the 2nd and got a error of course. I added start /wait rundll32 iernonce.dll,RunOnceExProcess just before

REG ADD %KEY%03 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /f but instead of installing at login it installed at T-12. No errors though. I tried this

REG ADD %KEY%03 /V 1 /D "start /wait rundll32 iernonce.dll,RunOnceExProcess" /f

REG ADD %KEY%04 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /f

That did not try to install at T-12 but the same thing happen at first login, it installs everything then tries to launch RunOnceEx2.cmd with errors. I tried your way darafat and it did nothing or it freaked out and the numbering was wrong. I tried to play around with your way but could not get anything working.

Link to comment
Share on other sites

i send u working sample.

if u want to restart in the middle of executing runonceex2, keep the remaining set of lines in a separate file like runonceex3 and add restart command as shown in runnceex. i find no need for the way u have been calling before and also doubt it would execute that way. if u have added it ur way, the entries after calling iernonce would never have added to the registry or it would get replaced by most recent entries.

RunOnceEx.cmd

cmdow @ /HID
@echo off

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

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%1 /VE /D ".Net FrameWork 1.1 & 2" /f
REG ADD %KEY%1 /V 1 /D "%systemdrive%\install\DNF11_20.exe" /f

rem REG ADD %KEY%2 /VE /D "Restarting for the next go around of programs" /f (commented. not necessary)
rem REG ADD %KEY%2 /V 1 /D "%systemdrive%\install\restart.cmd" /f (commented. not necessary)

REG ADD %KEY%3 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /f
REG ADD %KEY%3 /V 2 /D "shutdown -r -f -t 60 -c \"restarting to execute RunOnceEx2\"" /f
EXIT

RunOnceEx2.cmd

cmdow @ /HID
@echo off

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

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%4 /VE /D ".Net FrameWork 3" /f
REG ADD %KEY%4 /V 1 /D "%systemdrive%\install\DNF30.exe" /f

REG ADD %KEY%5 /VE /D "rasphone.pbk" /f
REG ADD %KEY%5 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f

REG ADD %KEY%6 /VE /D "modem initialization strings" /f
REG ADD %KEY%6 /V 1 /D "REGEDIT /S %systemdrive%\install\mistrngs.reg" /f

REG ADD %KEY%7 /VE /D "Java" /f
REG ADD %KEY%7 /V 1 /D "%systemdrive%\install\jre6.exe" /f

REG ADD %KEY%8 /VE /D "Thunderbird" /f
REG ADD %KEY%8 /V 1 /D "%systemdrive%\install\Tb1.5.0.9.exe -ms" /f

REG ADD %KEY%9 /VE /D "Firefox" /f
REG ADD %KEY%9 /V 1 /D "%systemdrive%\install\ff2.0.0.2.exe /S" /f

REG ADD %KEY%\10 /VE /D "7-Zip" /f
REG ADD %KEY%\10 /V 1 /D "%systemdrive%\install\7z442.exe /S" /f

REG ADD %KEY%\11 /VE /D "Winrar" /f
REG ADD %KEY%\11 /V 1 /D "%systemdrive%\install\wrar.exe /S" /f

REG ADD %KEY%\12 /VE /D "MozBackup" /f
REG ADD %KEY%\12 /V 1 /D "%systemdrive%\install\MozBackup145.exe /VERYSILENT" /f

REG ADD %KEY%\13 /VE /D "CCleaner" /f
REG ADD %KEY%\13 /V 1 /D "%systemdrive%\install\ccsetup137_basic.exe /S" /f

REG ADD %KEY%\14 /VE /D "Perfectdisk" /f
REG ADD %KEY%\14 /V 1 /D "%systemdrive%\install\perfectdisk.exe" /f

REG ADD %KEY%\15 /VE /D "Notepad++" /f
REG ADD %KEY%\15 /V 1 /D "%systemdrive%\install\npp.4.0.2.Installer.exe /S" /f

REG ADD %KEY%\16 /VE /D "Cleaning up" /f
REG ADD %KEY%\16 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /f

EXIT

Link to comment
Share on other sites

Yeah pretty much. Allot better results than what I got before. I think the title on the RunOnceEx2.cmd needs to be changed because the title does not show it only show Windows Update. Think I need to put the restart command before the command to run RunOnceEx2.cmd because I get the same error I did in post 10. I do have a question. You cannot use the same title over and over right? If you do they wouldnt get added to the registry right?

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