amd64 Posted January 25, 2005 Posted January 25, 2005 Hi, I was wondering if one of you clever ppl could tell me if this kind of setup in RunOnceEX.cmd would work. (before i go and try it)What i would like to know is will the batches of install files halt untill they are finished or will it continue to the next one using these commands?SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Unattended instalation - Applications..." /fREG ADD %KEY%\001 /VE /D "BitCommet" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fRD /S /Q "%Systemdrive%\Program Files\BitComet\fav"XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"REG ADD %KEY%\003 /VE /D "InCD" /fREG ADD %KEY%\003 /V 1 /D "%CDROM%\Apps\InCD\Setup.exe /SILENT /NOREBOOT" /fREG ADD %KEY%\005 /VE /D "System Info Tool" /fXCOPY /S "%CDROM%\Apps\SystemInfoTool" "%Systemdrive%\Program Files\SystemInfoTool\"COPY "%CDROM%\Links\System Info Tool.lnk" "%AllUsersProfile%\Start Menu\Programs\Accessories\System Tools\"or am I better of using a bunch of .cmd files?thanksamd64
Alanoll Posted January 25, 2005 Posted January 25, 2005 I don't understand.Do you have more CMD files? I don't see any. How are you calling them? When do you want them to be executed?
amd64 Posted January 25, 2005 Author Posted January 25, 2005 i was using .cmd files in place of the XCOPY an COPY comands.Sample of one of my .cmd files (Install_BitComet_Favorites.cmd)TITLE BitComet Favorites Installation......@Echo OffIF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:CLSCOLOR 0AECHO.ECHO.ECHO Installing BitComet Favorites...ECHO Please Wait...RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"ECHO Done!EXITand using it like thisREG ADD %KEY%\001 /VE /D "BitCommet Favorites" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fREG ADD %KEY%\001 /V 2 /D "%CDROM%\CMDS\Install_BitComet_Favorites.cmd" /f
Alanoll Posted January 25, 2005 Posted January 25, 2005 i'd stick with the CMD files..REG ADD %KEY%\001 /VE /D "BitCommet" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fRD /S /Q "%Systemdrive%\Program Files\BitComet\fav"XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"That is wrong. Without the CMD file it'd beREG ADD %KEY%\001 /VE /D "BitCommet" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fREG ADD %KEY%\002 /V 1 /D "CMD.EXE /C %RD /S /Q \"%Systemdrive%\Program Files\BitComet\fav\"" /fREG ADD %KEY%\003 /V 1 /D "CMD.EXE /C %XCOPY /S \"%CDROM%\Apps\Bit_Comet\fav\" "\%Systemdrive%\Program Files\BitComet\fav\"" /fOr so.
SiMoNsAyS Posted January 25, 2005 Posted January 25, 2005 ok i think i can understand you.on the first example REG ADD %KEY%\001 /VE /D "BitCommet" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fRD /S /Q "%Systemdrive%\Program Files\BitComet\fav"XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\" note that your favs will be copied (at t-13) BEFORE the program installs from runonce if you don't add REG ADD blah blah entries.so the correct would be use "a bunch of cmd files" like in the second example.next say that you haven't defined the variable %CDROM% on the runonce batch (you did it only on the favs cmd).
amd64 Posted January 25, 2005 Author Posted January 25, 2005 cheers ppl,@SiMoNsAySso the correct would be use "a bunch of cmd files" like in the second example.next say that you haven't defined the variable %CDROM% on the runonce batch (you did it only on the favs cmd).I was using the %CDROM% variable and it worked fine.But Alanoll's way sounds a lot better. This method has not been mentioned in the Unattended guide!!! (i think)think i'll go give it a try!cheers ppl
Alanoll Posted January 25, 2005 Posted January 25, 2005 But Alanoll's way sounds a lot better. This method has not been mentioned in the Unattended guide!!! (i think)You mean the CMD file or the calling CMD.EXE?If i ws to add it to the guide, I'd recommend the CMD file simply because it'd be easier.also, to avoid having to run the same IF EXIST thigns again (I like efficiency and yeah...)REG ADD %KEY%\001 /VE /D "BitCommet Favorites" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fREG ADD %KEY%\001 /V 2 /D "%CDROM%\CMDS\Install_BitComet_Favorites.cmd" /fcould be changed toREG ADD %KEY%\001 /VE /D "BitCommet Favorites" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fREG ADD %KEY%\001 /V 2 /D "%CDROM%\CMDS\Install_BitComet_Favorites.cmd %CDROM%" /fthen in your CMD fileInstead of:TITLE BitComet Favorites Installation......@Echo OffIF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:CLSCOLOR 0AECHO.ECHO.ECHO Installing BitComet Favorites...ECHO Please Wait...RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"ECHO Done!EXITHaveTITLE BitComet Favorites Installation......@Echo OffCLSCOLOR 0AECHO.ECHO.ECHO Installing BitComet Favorites...ECHO Please Wait...RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"XCOPY /S "%1%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"ECHO Done!EXITRemember, this is simply for effeciencies sake It decreases the time by a slight ammount, but negligible.
amd64 Posted January 25, 2005 Author Posted January 25, 2005 @AlanollYou have given me the code that readsREG ADD %KEY%\001 /VE /D "BitCommet" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fREG ADD %KEY%\002 /V 1 /D "CMD.EXE /C %RD /S /Q \"%Systemdrive%\Program Files\BitComet\fav\"" /fREG ADD %KEY%\003 /V 1 /D "CMD.EXE /C %XCOPY /S \"%CDROM%\Apps\Bit_Comet\fav\" "\%Systemdrive%\Program Files\BitComet\fav\"" /fShould it not read REG ADD %KEY%\001 /VE /D "BitComet" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /fREG ADD %KEY%\001 /V 2 /D "CMD.EXE /C %RD /S /Q \"%Systemdrive%\Program Files\BitComet\fav\"" /fREG ADD %KEY%\001 /V 3 /D "CMD.EXE /C %XCOPY /S \"%CDROM%\Apps\Bit_Comet\fav\" "\%Systemdrive%\Program Files\BitComet\fav\"" /for am i right in saying that you create a new %KEY% for each entry?
Alanoll Posted January 25, 2005 Posted January 25, 2005 whoops. knew there was a reason I said "or so" You're correct. I should have incremented the /V value instead of the KEY value.
amd64 Posted January 25, 2005 Author Posted January 25, 2005 cheers alanoll your a star this is going to save me a lot of headaches.
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