Jump to content

RunOnceEx Windows


Recommended Posts


Yes, with my method, you will have one window. Instead of listing every program that I install, I list the types of programs currently being installed. Who sits there and watches their UA CD install anyways... isn't that the point of a UA install? :)

I haven't tried jdgordon's method, but then again, there's always VMWare for you to use. ;)

Link to comment
Share on other sites

I split my RunOnceEx into blocks of 20 and end each block with rundll32.exe iernonce.dll,RunOnceExProcess and then start the numbering sequence back at 000. Been using this method without any problems.

cmdow @ /HID
@ECHO OFF

set tagfile=\WIN51
for %%i in (c 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:%tagfile%" set DVD=%%i:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET I=%DVD%\Install\

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

REG ADD %KEY%\000 /V 1 /D "%I%ISScript\ISScript.msi /norestart /qn" /f

REG ADD %KEY%\001 /VE /D "Belkin Wireless 54g" /f
REG ADD %KEY%\001 /V 2 /D "%I%Belkin\BelkinWiFi.exe" /f

REG ADD %KEY%\002 /VE /D "NET Framework 1.1 SP1" /f
REG ADd %KEY%\002 /V 1 /D "%I%Net\netfxsp1.exe" /f

REG ADD %KEY%\003 /VE /D "Autopatcher v5.1" /f
REG ADD %KEY%\003 /V 1 /D "%I%Autopatcher\Autopatcher.exe /unattend:t2 /skipdetection /noeula /noreboot" /f

etc......
etc......

REG ADD %KEY%\020 /VE /D "Block List Manager v2.5.3" /f
REG ADD %KEY%\020 /V 1 /D "%I%Blocklist\Blocklist_Manager.exe" /f
REG ADD %KEY%\020 /V 2 /D "REGEDIT /S %I%RegFiles\BLMSetting.reg" /f

rundll32.exe iernonce.dll,RunOnceExProcess
REG ADD %KEY% /V TITLE /D "Installing Programs" /f

REG ADD %KEY%\000 /vE /D "Hosts Manager v1.6.4.0" /f
REG ADD %KEY%\000 /V 1 /D "msiexec /i \"%I%HostManager\HostsManager.msi\" /qn" /f

REG ADD %KEY%\001 /VE /D "Agnitum Tauscan v1.70.1414" /f
REG ADD %KEY%\001 /V 1 /D "%I%Tauscan\Tauscan.exe /S" /f
REG ADD %KEY%\001 /V 2 /D "REGEDIT /S %I%RegFiles\Agnitum.reg" /f

REG ADD %KEY%\002 /VE /D "Smart WhoIs v4.0.0.157" /f
REG ADD %KEY%\002 /V 1 /D "%I%Smart\SmartWhoIs.exe /s" /f
REG ADD %KEY%\002 /V 2 /D "%I%Smart\Update.exe /s" /f
REG ADD %KEY%\002 /V 3 /D "REGEDIT /S %I%RegFiles\SmartWhoIs.reg" /f

etc......
etc......

REG ADD %KEY%\019 /VE /D "LClock v1.62b"
REG ADD %KEY%\019 /V 1 /D "%I%LClock\LC162b.exe /S" /f
REG ADD %KEY%\019 /V 2 /D "%I%LClock\LClock.exe /s" /f
REG ADD %KEY%\019 /V 3 /D "%I%LClock\LClock_Start.exe /s" /f

REG ADD %KEY%\020 /VE /D "Norton Ghost v9.0" /f
REG ADD %KEY%\020 /V 1 /D "msiexec /i %I%Ghost\Norton_Ghost_9.0.msi SERIALNUMBER=xxxx-xxxx-xxxx-xxxx REBOOT=ReallySuppress /qn" /f

rundll32.exe iernonce.dll,RunOnceExProcess
REG ADD %KEY% /V TITLE /D "Installing Programs" /f

REG ADD %KEY%\000 /VE /D "Office and Frontpage Pro 2003" /f
REG ADD %KEY%\000 /V 1 /D "%I%Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-!" /f
REG ADD %KEY%\000 /V 2 /D "%I%Frontpage\setup.exe TRANSFORMS=Unattended.MST /qb-!" /f
REG ADD %KEY%\000 /V 3 /D "REGEDIT /S %I%Regfiles\OutlookSettings.reg" /f

REG ADD %KEY%\001 /VE /D "Winamp Pro v5.094" /f
REG ADD %KEY%\001 /V 1 /D "%I%Winamp\Winamp5094.msi INI="%I%Winamp\Winamp.ini /qn"" /f
REG ADD %KEY%\001 /V 2 /D "%I%Winamp\Winamp-Files.exe /s" /f

REG ADD %KEY%\002 /VE /D "Ahead Nero and NeroVision" /f
REG ADD %KEY%\002 /V 1 /D "REGEDIT /S %I%RegFiles\NeroReg.reg" /f
REG ADD %KEY%\002 /V 2 /D "%I%Nero\Nero_Custom_Setup.exe" /f
REG ADD %KEY%\002 /V 3 /D "%I%Nero\Plugins.exe /s" /f
REG ADD %KEY%\002 /V 4 /D "REGEDIT /S %I%RegFiles\XP_Filetype_Restore.reg" /f
REG ADD %KEY%\002 /V 5 /D "REGEDIT /S %I%Regfiles\NeroTweak.reg" /f

etc.....
etc.....
etc.....

REG ADD %KEY%\019 /VE /D "RatDVD v0.76.1408" /f
REG ADD %KEY%\019 /V 1 /D "%I%RatDVD\ratDVD.exe /S" /f

REG ADD %KEY%\020 /VE /D "Macromedia Flash Player v8" /f
REG ADD %KEY%\020 /V 1 /D "msiexec /i \"%I%Flash\Flash_Player_8.msi"\ /norestart /qn" /f

REG ADD %KEY%\998 /VE /D "Cracking Installed Applications" /f
REG ADD %KEY%\998 /V 1 /D "REGEDIT /S %I%RegFiles\RegTweaks.reg" /f
REG ADD %KEY%\998 /V 2 /D "%I%Favorites.exe /s" /f
REG ADD %KEY%\998 /V 3 /D "%I%Desktop.exe /s" /f
REG ADD %KEY%\998 /V 4 /D "%I%QuickLaunch.exe /s" /f
REG ADD %KEY%\998 /V 5 /D "REGEDIT /S %I%RegFiles\WMP10.reg" /f
REG ADD %KEY%\998 /V 6 /D "REGEDIT /S %I%RegFiles\Blocklist.reg" /f
REG ADD %KEY%\998 /V 7 /D "%I%Associations.cmd" /f
REG ADD %KEY%\998 /V 8 /D "%I%Media.exe /s" /f
REG ADD %KEY%\998 /V 9 /D "REGEDIT /S %I%RegFiles\SpywareFix.reg" /f
REG ADD %KEY%\998 /V 10 /D "REGEDIT /S %I%RegFiles%\XP_FileType_Restore.reg" /f
REG ADD %KEY%\998 /V 11 /D "%I%\Hosts.exe /s" /f

REG ADD %KEY%\999 /VE /D "Removing Evidence and Rebooting" /f
REG ADD %KEY%\999 /V 1 /D "%DVD%\Restart.cmd" /f

rundll32.exe iernonce.dll,RunOnceExProcess
EXIT

Edited by yoz7120
Link to comment
Share on other sites

yoz7120, I tried your method with unquestionable success; instead of placing all of the keys in the registry at the T-12 stage of an XP installation, you create the registry keys on-the-fly for each category. It's genius, but I have two questions:

1) Why not zip up all of your applications into a self-extracting archive using 7zip? Reluctantly, I'll admit that I use an IBM Thinkpad R31 that did not come with a DVD capable drive. Thus, I use Nlite (big props to Nuhi, by the way) to reduce the source to 212.39 MB (no IE!), and then use the remaining space to include a great deal of programs, with the exception of Microsoft Office and Microsoft Visual Studio .NET 2003. Additionally, I copy the self-extracting archive to the root of the C: drive using the OEMPreInstall option in winnt.sif, since I figured an install using the hard drive is faster than that from a DVD or CD.

2) Although his method works perfectly, is this the only way to do it, or is it possible to actually have it work by completely using registry entries?

Link to comment
Share on other sites

Glad it worked for you tap52384. To answer your questions

1. Too lazy. Everything I install including windows only takes up 2.9gb on the DVD so plenty of space left before I think about having to shrink down the installation files.

2. Not sure its just the method I found that works, maybe someone else can answer this for you.

Link to comment
Share on other sites

I think this information about customizing RunOnceEx should be added to http://unattended.msfn.org.

Speaking of which, are there any planned updates to that site? There are some things that could be added, like nLite specifics, a permanent home for registry tweaks, and an updated list of necessities for installations, like popular codec packages and silent installation switches.

Link to comment
Share on other sites

Doesnt work for me :-(

I think its because I let the system reboot after a couple of patches, then continue with the scipt.. however, this prevents the additional windows opening up somehow.

If I remove the reboot command, it works fine..but I need to reboot to apply all my post sp2 hotfixes and patches, before installing my apps...

Link to comment
Share on other sites

Why don't you integrate the post-SP2 hotfixes with nLite (even if you don't use it to strip down XP) instead of installing them from RunOnceEx?

Your total CD size will be much smaller as well since files will no longer be duplicated.

Link to comment
Share on other sites

drscouse, from the way the script is currently written, a reboot would only allow it to complete the currently written registry entries in the RunOnceEx key. I imagine (hope nevertheless) that this could work:

REG ADD %KEY%\020 /VE /D "Block List Manager v2.5.3" /f
REG ADD %KEY%\020 /V 1 /D "%I%Blocklist\Blocklist_Manager.exe" /f
REG ADD %KEY%\020 /V 2 /D "REGEDIT /S %I%RegFiles\BLMSetting.reg" /f

#this is the line that creates a new window, clears current RunOnceEx entries, I believe
REG ADD %KEY%\020 /V 3 /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f

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

In theory, I think that this way, you should be able to reboot and the different windows are still created as planned. Try it out and let me know.

Edited by tap52384
Link to comment
Share on other sites

Thank tap52384.. will give it a go shortly and let you know...

I dont use nlite, but the english version of a utility found here

http://www.vitaligraf.de/

I found it very suited to me needs, although I do end up customiseing a lot of the files for my particular needs...

I us Autopatcher to update my system, and run it from ROE... I just wanted to reboot after installing this, prior to installing my apps.. some of which needs the updates in AP....

Im currently re-thinking my install strategy, moving things about, trying to find the best order to install things, and at what part in the timeline.

My ROE is quite large, and I like the idea of splitting it up into smaller windows...

Thanks

Link to comment
Share on other sites

Hmmm Ive tried many variations based on that line.. but it cause allsorts of weird happenings, apart from the one I want...

The following is my test script, which I want to reboot after "Installing Drivers & Hotfixes" is completed, and resume with the install on a clean window. However, it reboots, and does not run any further....

If I remove

REG ADD %KEY%\003 /VE /D "#REBOOT#...." /f

REG ADD %KEY%\003 /V 5 /D %WINDIR%\system32\ShutDown.cmd

The install works well, and three ROE windows will popup for each respective section.. however, it obviously now does not reboot.

If I leave that line in, and alter the number sequenced so they are all concurrent, it will reboot half way through the list, and then resume, however, it will then not display any further ROE windows...

cmdow @ /HID

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

for %%a in (z y x w v u t s r q p o n m l k j i h g f e d c) do if exist %%a:\I386 (

set CDROM=%%a:

goto install

)

:install

REG ADD %KEY% /V TITLE /D "Installing Drivers & Hotfixes" /f

REG ADD %KEY%\000 /VE /D "ATi Control Panel" /f

REG ADD %KEY%\000 /V 01 /D "\"%CDROM%\Software\ATi Control Panel\Setup.exe\" /k" /f

REG ADD %KEY%\001 /VE /D "Nvidia Audo Mixer" /f

REG ADD %KEY%\001 /V 01 /D "\"%CDROM%\Software\Nvidia Audo Mixer\Setup.exe\" /s" /f

REG ADD %KEY%\002 /VE /D "UPHClean (WinService)" /f

REG ADD %KEY%\002 /V 01 /D "\"%CDROM%\Software\UPHClean\uphclean.msi\" /quiet /passive" /f

REG ADD %KEY%\003 /VE /D "#REBOOT#...." /f

REG ADD %KEY%\003 /V 5 /D %WINDIR%\system32\ShutDown.cmd

rundll32.exe iernonce.dll,RunOnceExProcess

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

REG ADD %KEY%\000 /VE /D "TaskSwitchXP" /f

REG ADD %KEY%\000 /V 01 /D "\"%CDROM%\Software\TaskSwitchXP\TSXP.exe\" /S" /f

REG ADD %KEY%\001 /VE /D "ExplorerXP" /f

REG ADD %KEY%\001 /V 01 /D "\"%CDROM%\Software\ExplorerXP\eXP.exe\" /S" /f

REG ADD %KEY%\002 /VE /D "Free Download Manager" /f

REG ADD %KEY%\002 /V 01 /D "\"%CDROM%\Software\Free DownMan\fdminst.exe\" /sp- /silent" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Applying RegTweaks & Fixes" /f

REG ADD %KEY%\000 /VE /D "UltraISO Reg" /f

REG ADD %KEY%\000 /V 01 /D "regedit /s \"%CDROM%\Software\UltraISO Reg\Serial.reg\"" /f

REG ADD %KEY%\001 /VE /D "ExplorerXP" /f

REG ADD %KEY%\001 /V 01 /D "regedit /s \"%CDROM%\Software\ExplorerXP\CustomREG.reg\"" /f

REG ADD %KEY%\020 /VE /D "Restore Manual Logon" /f

REG ADD %KEY%\020 /V 01 /D "regedit /s \"%WINDIR%\system32\manlogon.reg\"" /f

REG ADD %KEY%\050 /VE /D "Clean & Reboot" /f

REG ADD %KEY%\050 /V 5 /D "shutdown.exe -r -f -t 60 -c \"#FINAL BOOT SEQUENCE#\"" /f

rundll32.exe iernonce.dll,RunOnceExProcess

EXIT

I have tried adding the line you suggested both before and after the shutdown command, but it then affects the way it runs...

I cant seem to find the meeting in the middle of the 2 methods I have

1. One long ist, with a reboot in the middle, but continues with the list

2. No reboot, but 3 seperate ROE windows...

Its quite a labourious task even using VMWare so not to kill my one and only PC... I would really appreciate any help with fine tuning this process...

Thanks

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