dread Posted February 27, 2007 Posted February 27, 2007 I did a search and fount a good bit but still cannot get it to work. I have tried so many ways I am going cross eyed lol. Does anyone have have a up to date working example?
Muki Posted February 28, 2007 Posted February 28, 2007 (edited) 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 February 28, 2007 by Muki
dread Posted February 28, 2007 Author Posted February 28, 2007 I mean when the computer first starts up running one RunOnceEx and in that RunOnceEx it will tell the computer to reboot and when the computer reboots having a second RunOnceEx run.
Muki Posted February 28, 2007 Posted February 28, 2007 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.
dread Posted February 28, 2007 Author Posted February 28, 2007 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.
rajesh.kumar Posted March 1, 2007 Posted March 1, 2007 (edited) 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\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Apps" /fREG ADD %KEY%01 /VE /D "Installing ..." /fREG ADD %KEY%01 /V 1 /D "%CDROM%\...." /fREG ADD %KEY%02 /VE /D "Execute RunOnceEx2 in the next restart" /fREG ADD %KEY%02 /V 1 /D "%CDROM%\RunOnceEx2.cmd" /fshutdown.exe -r -f -t 60 -c "Restart to execute RunOnceEx2.cmd.."EXITRunOnceEx2.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\RunOnceExREG ADD %KEY% /V TITLE /D "Another set of installations..." /fREG ADD %KEY%01 /VE /D "Installing..." /fREG ADD %KEY%01 /V 1 /D "%CDROM%\..." /fEXIT Edited March 1, 2007 by rajesh.kumar
dread Posted March 1, 2007 Author Posted March 1, 2007 Here is what I have so far and what is not workingcmdlines.txt[COMMANDS]"useraccounts.cmd""REGEDIT /S regtweaks.reg""RunOnceEx.cmd"RunOnceEx.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%01 /VE /D ".Net FrameWork 1.1 & 2" /fREG ADD %KEY%01 /V 1 /D "%systemdrive%\install\DNF11_20.exe" /fREG ADD %KEY%02 /VE /D "Restarting for the next go around of programs" /fREG ADD %KEY%02 /V 1 /D "%systemdrive%\install\restart.cmd" /fREG ADD %KEY%03 /V 1 /D "%systemdrive%\install\RunOnceEx2.cmd" /fEXITRunOnceEx2.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%04 /VE /D ".Net FrameWork 3" /f REG ADD %KEY%04 /V 1 /D "%systemdrive%\install\DNF30.exe" /fREG ADD %KEY%05 /VE /D "rasphone.pbk" /f REG ADD %KEY%05 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f rundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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" /frundll32.exe iernonce.dll,RunOnceExProcessREG 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" /frundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Final restart and cleaning" /fREG ADD %KEY%01 /VE /D "Cleaning up" /f REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /fEXIT
rajesh.kumar Posted March 1, 2007 Posted March 1, 2007 (edited) 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 March 1, 2007 by rajesh.kumar
darafat Posted March 1, 2007 Posted March 1, 2007 (edited) I think the you must order this one:RunOnceEx2.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%04 /VE /D ".Net FrameWork 3" /f REG ADD %KEY%04 /V 1 /D "%systemdrive%\install\DNF30.exe" /fREG ADD %KEY%05 /VE /D "rasphone.pbk" /f REG ADD %KEY%05 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f rundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG 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" /frundll32.exe iernonce.dll,RunOnceExProcessREG 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" /frundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY% /V TITLE /D "Final restart and cleaning" /fREG ADD %KEY%01 /VE /D "Cleaning up" /f REG ADD %KEY%01 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /fEXITlike this:RunOnceEx2.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%05 /VE /D ".Net FrameWork 3" /f REG ADD %KEY%05 /V 1 /D "%systemdrive%\install\DNF30.exe" /fREG ADD %KEY%10 /VE /D "rasphone.pbk" /f REG ADD %KEY%10 /V 1 /D "%systemdrive%\install\rasphone.cmd" /f rundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY%13 /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY%22 /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY%32 /V TITLE /D "Installing Applications" /fREG 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,RunOnceExProcessREG ADD %KEY%42 /V TITLE /D "Installing Applications" /fREG 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" /frundll32.exe iernonce.dll,RunOnceExProcessREG 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" /frundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY%62 /V TITLE /D "Final restart and cleaning" /fREG ADD %KEY%65 /VE /D "Cleaning up" /f REG ADD %KEY%60 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /fEXITyou can try p.s:i m not sure about that:rundll32.exe iernonce.dll,RunOnceExProcessREG ADD %KEY%42 /V TITLE /D "Installing Applications" /fyou ve put it too times (maybe two are enought)anyway i don't' think so that you ve to put /V TITLEmaybe it have to be something like this:REG ADD %KEY%42 /VE /D "what you want" /fREG ADD %KEY%42 /V 1 /D "rundll32.exe iernonce.dll,RunOnceExProcess" /fi m not sure about the last one because i don't use ie7, anyway you can try ^^ Edited March 1, 2007 by darafat
dread Posted March 2, 2007 Author Posted March 2, 2007 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" /fREG 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.
rajesh.kumar Posted March 3, 2007 Posted March 3, 2007 do u want this way : after executing runonceex during installtion, -->restart-->execute runonceex2.orafter executing runonceex -->immediately call and execute runonceex2.
dread Posted March 3, 2007 Author Posted March 3, 2007 after executing runonceex during installtion, -->restart-->execute runonceex2
rajesh.kumar Posted March 3, 2007 Posted March 3, 2007 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.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%1 /VE /D ".Net FrameWork 1.1 & 2" /fREG ADD %KEY%1 /V 1 /D "%systemdrive%\install\DNF11_20.exe" /frem 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" /fREG ADD %KEY%3 /V 2 /D "shutdown -r -f -t 60 -c \"restarting to execute RunOnceEx2\"" /fEXITRunOnceEx2.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%4 /VE /D ".Net FrameWork 3" /f REG ADD %KEY%4 /V 1 /D "%systemdrive%\install\DNF30.exe" /fREG 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" /fREG 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" /fREG ADD %KEY%\16 /VE /D "Cleaning up" /f REG ADD %KEY%\16 /V 1 /D "%systemdrive%\install\Cleanup.cmd" /fEXIT
dread Posted March 3, 2007 Author Posted March 3, 2007 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?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now