jda11560 Posted November 9, 2006 Posted November 9, 2006 The RunOnceEx example listed at: RunOnceEx does not work for/in Windows 2000; however, if you convert your RunOnceEx.cmd file to a Registry file you will have success.I created/copied a suitable RunOnceEx.cmd file, ran (doubleclick) the file and then saved the RunOnceEx (Registry) branch as RunOnceEx.reg; this I did in Windows XP. (simply because I did not know how to create a Registry script).RunOnceEx runs exactly as it should, when it should (just after first logon). If any of your installation programs need to reboot immediately after install, RunOnceEx will, on next startup, continue on from previously installed program; RunOnceEx keys do not get deleted until after the program/file runs or is cancelled.The only problem with using a *.reg file is the path(s) must be absolute, e.g. %systemdrive% wil not work.Here is a short sample, you will be able to create your own *.reg file from this if you wish.Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]"TITLE"="Installing Applications"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\010]@=".NET Framework V1.1 SP1""1"="C:\\install\\dotnet11sp1.exe"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\018]@="Windows MediaPlayer V9""1"="C:\\install\\MPSetup9.exe"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\019]@="Tweakui V1.33.0.0""1"="rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 C:\\install\\tweakui.inf"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\020]@="Java Runtime Environment V1.5.0.90""1"="C:\\install\\jre509.exe"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\095]@="Cleaning up, delete temp files""1"="C:\\install\\cleanup.cmd"Where ther are quotes, " , these must remain, and where there are double \\ , these too must remain.The numbers after \RunOnceEx\ are simply to provide order/sequence, lowest numeric/alphanumeric will run first. If you read the RunOnceEx example, this is exactly the same except for being a *.reg file.To integrate/merge quietly into the registry, use (in cmdlines.txt): regedit /sExample:[Commands]"some command 1""regedit.exe /s RunOnceEx.reg""some command x"
Ctrl-X Posted November 12, 2006 Posted November 12, 2006 RunOnceEx.cmd does work with Windows 2000, as long as you add REG.EXE to the installation image. AFAIK it's included in the Resource Kit tools.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now