fatc2k3 Posted February 5, 2008 Share Posted February 5, 2008 i`m trying to follow the guide for Creating a RunOnceEx.cmd file , but im a little confused as to where to put my appz. Do they go in $Progs or %systemdrive%\install\ ? So do i have to create an install folder? if so where or do i just plae the .exe files in my $Progs folder? Link to comment Share on other sites More sharing options...
jbm Posted February 6, 2008 Share Posted February 6, 2008 You can put your apps anywhere you want just make sure the pathsin your runonceex.cmd file point to the correct location.Keep in mend if you have oempreinstall=yes in your winnt.siffile and your install dir in $prog the correct path will be%ProgramFiles%\install other wice it will be cdrom:\$OEM%\%Progs\installwhere cdrom is the drive letter of your cd rom. Link to comment Share on other sites More sharing options...
Arie Posted February 6, 2008 Share Posted February 6, 2008 i`m trying to follow the guide for Creating a RunOnceEx.cmd file , but im a little confused as to where to put my appz. Do they go in $Progs or %systemdrive%\install\ ? So do i have to create an install folder? if so where or do i just plae the .exe files in my $Progs folder?As already answered by "jbm", the files can go anywhere you want, as long as the path used in your RunOnceEx will be the same of course. But instead of using $OEM$-folders, which are first copied to your hard disk, you could also simply install applications directly from your installation disc. See the Unattended Guide on how to discover your installation disc via RunOnceEx. Link to comment Share on other sites More sharing options...
MHz Posted February 6, 2008 Share Posted February 6, 2008 On the RunOnceEx.cmd page is a link for $OEM$ Distribution Folders. The explanation mentioned in the link is very good.I modified the guides example to make install from "$OEM$\Install" on CD/DVD media. I also used Call to make the Labels act like subroutines to generate the registry key/value numbers for ease. Perhaps good if you stick with basics to learn but it does show how to set the path to your installation files if you want to install from CD/DVD media. Just the Call commands should need alteration in the :Main labeled area for usecmdow @ /HID@Echo OffGoto :Main:: Install programs from subfolder of $OEM$ named "Install".:: %~dp0 is the path to this cmd script (including trailing backslash as tested on WinXP).:: %INSTALLROOT% is the path to this cmd script with the "Install" folder concatenated to it.:: %~nx0 is the name of this cmd script with extension.:: If "%INSTALLROOT%\" does not exist, then it will be logged to %SYSTEMDRIVE%\SetupError.log.:: Call :WindowTitle uses the parameter as a window title to add to registry.:: Call :ProgramTitle uses the parameter as program title, increases %PROGRAM_NUMBER% by 1,:: sets %COMMAND_NUMBER% to 0 and then adds to registry.:: Call :Command uses the parameter as a command, increases %COMMAND_NUMBER% by 1 and then:: adds to registry.:: Call :RunOnceExProcess to immediately execute RunOnceEx entries with the registry.:Main SetLocal Set KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx Set PROGRAM_NUMBER=1000 Set COMMAND_NUMBER=0 Set INSTALLROOT=%~dp0Install If Not Exist "%INSTALLROOT%\" ( Echo %~nx0 : INSTALLROOT "%INSTALLROOT%\" not found>>%SYSTEMDRIVE%\SetupError.log Goto :EOF ) Call :WindowTitle "Installing Applications" Call :ProgramTitle "Adobe Reader 6" Call :Command "%INSTALLROOT%\AdobeReader6\AR6.msi /qn" Call :ProgramTitle "Alcohol 120" Call :Command "%INSTALLROOT%\alcohol\setup.exe /qn" Call :Command "REGEDIT /S %INSTALLROOT%\alcohol\register.reg" Call :ProgramTitle "Diskeeper 8" Call :Command "%INSTALLROOT%\DiskeeperPro_8.0.459.exe /s /v/qn /f2%TEMP%\DiskeeperPro.log" Call :ProgramTitle "Importing Registry Tweaks" Call :Command "REGEDIT /S %INSTALLROOT%\regtweaks.reg" Call :ProgramTitle "Cleaning Up and Rebooting" Call :Command "%INSTALLROOT%\cleanup.cmd" EndLocalGoto :EOF:WindowTitle REG ADD %KEY% /V TITLE /D %1 /fGoto :EOF:ProgramTitle Set /a PROGRAM_NUMBER+=1 Set COMMAND_NUMBER=0 REG ADD %KEY%\%PROGRAM_NUMBER% /VE /D %1 /fGoto :EOF:Command Set /a COMMAND_NUMBER+=1 REG ADD %KEY%\%PROGRAM_NUMBER% /V %COMMAND_NUMBER% /D %1 /fGoto :EOF:RunOnceExProcess Start /Wait rundll32.exe iernonce.dll,RunOnceExProcessGoto :EOF 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