ankap Posted September 8, 2004 Posted September 8, 2004 I've created a utility for changing CDsIt ejects the CD and asks for the second or third CD, checks the label in every CD-ROM, finds out drive letter and if it is the write CD executes a file otherwise ejects and checks again until the write CD is inserted or cancel pressed (pressing cancel executes another file).It has 3 parameters1. CD Label to be checked and displayed.2. Batch file to be executed (must be on the CD as it returns drive letter and command specified in this parameter)3. Batch file to be executed when cancel pressed.This is universal as it takes Labels and commands by parameters so you can use it for many CDs.Feel free to ask me if you have questions.install.exe
XtremeMaC Posted September 8, 2004 Posted September 8, 2004 wow seems like a nice utility for ppl doing 2+ cd installs (I haven't tried it, don't need it)but when does this run?
ankap Posted September 8, 2004 Author Posted September 8, 2004 You can run it when you need to change CD for example in batch file from GUIRunOnceI use this for RunOnceEx Setup
swampy Posted September 8, 2004 Posted September 8, 2004 Could you post an example batch file, please?
ankap Posted September 9, 2004 Author Posted September 9, 2004 Start it with 3 parameters install.exe par1 par2 par3par1 = CD Label to be checkedpar2 = Command to be exexuted when it finds the CD (note that it returns drive letter of CD-ROM and you need to give only command with \ )par3 = Command to be executed when cancel pressedhere is an example............................ECHO Removing useless shortcuts...DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Update.lnk"DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk"DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk"ECHO.start /wait install.exe "Applications CD" \setup.cmd %SystemDrive%\install\cleanup.cmdEXITThe program will check for the CD labeled "Applications CD" and execute setup.cmd in that CD with parameter which is drive letter so you can easyly get drive letter in your batch file here is an examplecmdow @ /HID@Echo OffSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Programs" /fREG ADD %KEY%\000 /VE /D "Acdsee 6.0.6" /fREG ADD %KEY%\000 /V 1 /D "%1\defaults\ACDSee6\acdsee6.msi /qn REBOOT=Suppress" /fREG ADD %KEY%\015 /VE /D "Acrobat Reader 6.0.2" /fREG ADD %KEY%\015 /V 1 /D "%1\defaults\AR6\setup.exe /S /v/qn" /fREG ADD %KEY%\015 /V 2 /D "%1\defaults\AR6\6.0.2_Update.exe /S /v/qn" /f............................%1 is given from install.exe and is drive letterYou can even add it in RunOnceEx during installation to change another CD
SiMoNsAyS Posted September 9, 2004 Posted September 9, 2004 maybe i can slipstream this method with mine...
ankap Posted September 9, 2004 Author Posted September 9, 2004 Please tell me if you find it usefull or if u find bugs and suggestions
oioldman Posted October 12, 2004 Posted October 12, 2004 Have only done a basic test.Made a bat file, and ran it on pc and it ejected cd and started to the run setup with no issues.The command I used wasstart /wait install.exe "NMC_Apps" \visio\seup.exeSo am guessing that to add this to my unonceex.cmd, i just need to add that line at the end? or does it need to be runceex.cmd style with the reg add key parts as well?Thank you
ankap Posted November 4, 2004 Author Posted November 4, 2004 You can use it for any method but you must provide 3 parameters, the 3rd one is for cancel command.
ankap Posted November 28, 2004 Author Posted November 28, 2004 Have you find it useful and any sugestions ?
mrclunk Posted December 7, 2004 Posted December 7, 2004 Hi ankap , Thanks for the script, just what i was after but..im not sure if ive implemented it right. (NOob)it asks for the cd, put it in , click ok and the i get this errorMy batch filesCLS@echo offTITLE Windows XP SP2 - Unattended InstallationECHO Applying Registry Tweaks...REGEDIT /S %systemdrive%\install\RegTweaks.regECHO Starting installation of ApplicationsECHO Installing Opera v7.54 ECHO Please wait...start /wait %systemdrive%\install\opera\o754_3869.exe /sECHO Please wait...start /wait %systemdrive%\install\install.exe "Applications_CD" \setup_office2003.cmd %SystemDrive%\install\cleanup.cmdECHO Restarting the PC in 4 minutes...shutdown.exe -r -f -t 240 -c "Windows XP will now restart in 4 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installEXITOn The Applications_CD.iso CD ive the following @echo offTITLE Windows XP SP2 - Unattended Installation (office cd)ECHO.ECHO.ECHO Installing Office ECHO Please wait...start /wait %1\Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-ECHO Restarting the PC in 4 minutes...shutdown.exe -r -f -t 240 -c "Windows XP will now restart in 4 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installEXITive also a cleanup.cmd file too.This is really bugging me, my first attempt at batch files. Big up too all the MSFN massive, great site.
Tsunami Posted December 7, 2004 Posted December 7, 2004 Your AutoIt script looks for C:\install.exe, and your batch file runs C:\install\install.exe. Change your AutoIt script to use %systemdrive%\install\install.exe.
ankap Posted December 9, 2004 Author Posted December 9, 2004 Look its smth wrong with your setup_office2003.cmd file. Is it in the root of your CD ? Cause it can't find that file. The program tries to run file G:\setup_office2003.cmd (g: is your CD-ROM letter) so it must be in the root of your CD.
mrclunk Posted December 9, 2004 Posted December 9, 2004 cheers guys that sorted it. office was in %CDROM%\office_2003\setup...respect
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