mwiner Posted October 15, 2004 Share Posted October 15, 2004 During the RunOnceEX at the very end can I have it add more keys to the RunOnceEx for the next reboot?Would it be best to start the key numbers back to 1?Any ideas? Thanks! Link to comment Share on other sites More sharing options...
Denney Posted October 15, 2004 Share Posted October 15, 2004 Yes it is possible (I use the following method). Once RunOnceEx starts, any new keys you add will be run during the NEXT boot.Say you call your original RunOnceEx entries 0001, 0005, 1000, 4000 and 6000... To add some for next boot, I prefix each entry with B2 (or whatever number boot it is).So you would import entries called B21000, B22000, B26000 and B28010... Get the idea? Link to comment Share on other sites More sharing options...
sixpack Posted October 15, 2004 Share Posted October 15, 2004 Yes it is possible (I use the following method). Once RunOnceEx starts, any new keys you add will be run during the NEXT boot.Say you call your original RunOnceEx entries 0001, 0005, 1000, 4000 and 6000... To add some for next boot, I prefix each entry with B2 (or whatever number boot it is).So you would import entries called B21000, B22000, B26000 and B28010... Get the idea?thanks nice solution Link to comment Share on other sites More sharing options...
ran Posted October 15, 2004 Share Posted October 15, 2004 Hmmm.....a bit confused:For adding more runonceex's..would you have to have a reg entry at the end of your original runonceex.cmd that "calls" another .reg file? Or are you saying that by having the naming scheme "b2001" it will automatically run those on 2nd bootup?Ran Link to comment Share on other sites More sharing options...
kyuuzo Posted October 15, 2004 Share Posted October 15, 2004 You need to call another reg file. The numbers have no relation to first and second. Link to comment Share on other sites More sharing options...
sixpack Posted October 15, 2004 Share Posted October 15, 2004 Hmm.. did try it and it doesend seam to work Link to comment Share on other sites More sharing options...
Raja Posted October 15, 2004 Share Posted October 15, 2004 Call a reg merge from RunOnce to create a RunOnceEx keys and it will be effective on the next logon or reboot. RunOnce entries are enumerated after RunOnceEx's are. Having the reg merge done from RunOnce will simply create the entries in RunOncex and as RunOnceEx aready had its turn, the entries will not be executed till next logon or Reboot.Good Luck! Link to comment Share on other sites More sharing options...
ran Posted October 16, 2004 Share Posted October 16, 2004 example code would be (to merge .reg from runonce).... Ran Link to comment Share on other sites More sharing options...
Raja Posted October 17, 2004 Share Posted October 17, 2004 1. Create a .reg file with following and save it as C:\RunOnceEx.regWindows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001]"RunOnceEx"="Notepad.exe"2. Create following String Value entry under RunOnce key:ValueName = RunOnceEx and its value as Regedit /s C:\RunOnceEx.reg OR Alternatively to achieve the same create another .reg file as below and run it by double clicking on it.Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]"RunOnceEx"="Regedit /s C:\\RunOnceEx.reg"The RunOnce reg entry when executed, after all RunOnceEx entries are executed(if any), will create entry to run Notepad in RunOnceEx and will not be initiated till next logon or reboot. At the next logon/reboot, RunOnceEx entries will be enumerated and as a result Notepad will fire up. Link to comment Share on other sites More sharing options...
Denney Posted October 17, 2004 Share Posted October 17, 2004 Here is an example of how is should be laid out (note: after RunOnceEx has started, you cannot add entries to the CURRENT boot. Any entries you add will install NEXT boot regardless of wether RunOnceEx has finished or not).1. RunOnceEx.cmd file (imported during CMDLINES):regedit.exe /s "RunOnceExFirstBoot.reg"2. RunOnceExFirstBoot.reg (run from RunOnceEx.cmd during CMDLINES):Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]"Title"="Post Setup FIRST Boot"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001]@="RunOnceEx Second Boot""1"="RunOnceEx2.cmd"3. RunOnceEx2.cmd (executed during first boot):regedit /s 'RunOnceExSecondBoot.reg"4. RunOnceExSecondBoot.reg (run from RunOnceEx2.cmd on first boot):Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]"Title"="This can be whatever but won't actually be displayed"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\B20001]@="A Program Run On SECOND Boot""1"="SomeProgram.exe"Note: The title for the RunOnceEx window on second boot won't be displayed as Windows deletes the Title value when it finishes executing all the RunOnceEx entries.If you need anymore help, let me know. Link to comment Share on other sites More sharing options...
ICANIT Posted October 17, 2004 Share Posted October 17, 2004 The easy way :At the bottom of your first RunonceEx.cmd file put this :REG ADD %KEY%\098 /V 1 /D "%Systemdrive%\Install\Secondrun.cmd" /fin "secondrun.cmd" you just put your applications in the same way as you did in Runonceex.cmd. remember to put a line to reboot windows, at the end of your "secondrun.cmd" file, like :Shutdown.exe -r -f -t 60 -c "windows will restart in 1 min..."Works for me. Link to comment Share on other sites More sharing options...
Denney Posted October 17, 2004 Share Posted October 17, 2004 That is easier but you will have NO IDEA about what program is being installed on second boot.The way I outlined, you still have the RunOnceEx window with information on what is currently being installed. Link to comment Share on other sites More sharing options...
ICANIT Posted October 17, 2004 Share Posted October 17, 2004 You DO have an idea of whats being installed.First of all, you write your applications that you like to be installed on the second boot in "secondrun.cmd" and second they will be run from Runonceex exactly as the first portion did.I am not saying your method is wrong or anything, just informing how it also can be done. Link to comment Share on other sites More sharing options...
maxXPsoft Posted November 14, 2004 Share Posted November 14, 2004 I've had sucess with Splitting the Runonex entries in 2 flavors by my UnattendXP application. I prefer the first so I'll stick with it for now unless someone can show me why it be better to use different method.1. It executes first then second one as it starts deletes the entries from first and pops up with new Title and all. This method allow's it to load desktop while it is running which is Ok by me as it install's everything and then reboot's.2. It executes first then second one comes up with first still showing. It even came up behind first one in one test run. Thats why i like # 1No reboot, its all done first time using either method. Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted January 26, 2005 Share Posted January 26, 2005 I've had sucess with Splitting the Runonex entries in 2 flavors by my UnattendXP application. I prefer the first so I'll stick with it for now unless someone can show me why it be better to use different method.1. It executes first then second one as it starts deletes the entries from first and pops up with new Title and all. This method allow's it to load desktop while it is running which is Ok by me as it install's everything and then reboot's.2. It executes first then second one comes up with first still showing. It even came up behind first one in one test run. Thats why i like # 1No reboot, its all done first time using either method.Could you possibly give an example of your first method, how you are calling the second cmd? RegardsMaverick Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now