MSFN Forum: Utility for changing CD-s - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Utility for changing CD-s Rate Topic: -----

#1 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 07 September 2004 - 08:03 PM

I've created a utility for changing CDs
It 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 parameters
1. 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.

Attached File(s)




#2 User is offline   XtremeMaC 

  • MSFN SuperB
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5,070
  • Joined: 13-October 03

Posted 07 September 2004 - 08:35 PM

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?

#3 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 07 September 2004 - 08:59 PM

You can run it when you need to change CD for example in batch file from GUIRunOnce
I use this for RunOnceEx Setup

#4 User is offline   swampy 

  • Junior
  • Pip
  • Group: Members
  • Posts: 92
  • Joined: 26-January 04

Posted 07 September 2004 - 10:30 PM

Could you post an example batch file, please?

#5 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 09 September 2004 - 09:46 AM

Start it with 3 parameters

install.exe par1 par2 par3

par1 = CD Label to be checked
par2 = 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 pressed

here 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.cmd
EXIT


The 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 example

cmdow @ /HID
@Echo Off

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

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

REG ADD %KEY%\000 /VE /D "Acdsee 6.0.6" /f
REG ADD %KEY%\000 /V 1 /D "%1\defaults\ACDSee6\acdsee6.msi /qn REBOOT=Suppress" /f

REG ADD %KEY%\015 /VE /D "Acrobat Reader 6.0.2" /f
REG ADD %KEY%\015 /V 1 /D "%1\defaults\AR6\setup.exe /S /v/qn" /f
REG 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 letter

You can even add it in RunOnceEx during installation to change another CD

#6 User is offline   SiMoNsAyS 

  • C'mon you apes! You wanna live forever!?
  • Group: Patrons
  • Posts: 3,455
  • Joined: 17-May 04

Posted 09 September 2004 - 10:16 AM

maybe i can slipstream this method with mine... :thumbup

#7 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 09 September 2004 - 10:18 AM

Please tell me if you find it usefull or if u find bugs and suggestions :)

#8 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 14 September 2004 - 09:11 PM

Does anyone tried this ?

#9 User is offline   oioldman 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 967
  • Joined: 16-April 04
  • OS:Windows 7 x64

Posted 12 October 2004 - 02:26 PM

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 was
start /wait install.exe "NMC_Apps" \visio\seup.exe

So 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

#10 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 04 November 2004 - 01:47 PM

You can use it for any method but you must provide 3 parameters, the 3rd one is for cancel command.

#11 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 27 November 2004 - 10:35 PM

Have you find it useful and any sugestions ?

#12 User is offline   mrclunk 

  • Group: Members
  • Posts: 2
  • Joined: 07-December 04

Posted 07 December 2004 - 01:06 PM

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 error

Posted Image

My batch files


CLS
@echo off
TITLE Windows XP SP2 - Unattended Installation

ECHO Applying Registry Tweaks...
REGEDIT /S %systemdrive%\install\RegTweaks.reg
ECHO Starting installation of Applications
 
ECHO Installing Opera v7.54 
ECHO Please wait...
start /wait %systemdrive%\install\opera\o754_3869.exe /s

ECHO Please wait...
start /wait %systemdrive%\install\install.exe "Applications_CD" \setup_office2003.cmd %SystemDrive%\install\cleanup.cmd

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%\Drivers
RD /S /Q %systemdrive%\install
EXIT


On The Applications_CD.iso CD ive the following

@echo off
TITLE 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%\Drivers
RD /S /Q %systemdrive%\install
EXIT


ive 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. :thumbup

#13 User is offline   Tsunami 

  • Member
  • PipPip
  • Group: Members
  • Posts: 292
  • Joined: 05-March 04

Posted 07 December 2004 - 01:20 PM

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.

#14 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 09 December 2004 - 12:36 AM

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.

#15 User is offline   mrclunk 

  • Group: Members
  • Posts: 2
  • Joined: 07-December 04

Posted 09 December 2004 - 07:54 AM

cheers guys that sorted it.

office was in %CDROM%\office_2003\setup...

respect

#16 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 09 December 2004 - 03:26 PM

so you must write

ECHO Please wait...
start /wait %systemdrive%\install\install.exe "Applications_CD" \office_2003\setup_office2003.cmd %SystemDrive%\install\cleanup.cmd


#17 User is offline   JPamplin 

  • format c: /u - It is your desssssstiny.
  • PipPip
  • Group: Members
  • Posts: 143
  • Joined: 06-January 04

Posted 16 December 2004 - 11:06 AM

Does this run in DOS? I'm looking for a safe way to eject a CD and insert another one without losing the location of the batch file and having an invalid COMMAND.COM file from the bootable floppy portion of the first CD.

Thanks,

JP

#18 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 17 December 2004 - 07:55 PM

no it is for windows only
it is used for changing CD after windows install finishs.
you can use it either in batch file or in runonceex.cmd.

#19 User is offline   ankap 

  • Junior
  • Pip
  • Group: Members
  • Posts: 96
  • Joined: 18-March 04

Posted 24 December 2004 - 08:29 PM

CD Changer Updated!
I have updated this tool now it is more customizable

Quote

Changes:
Added more features
Icon changed
Bugs fixed

Quote

New features are

1. Used without any switch ejects the CD-DRIVE (if it is run from CD) or ejects all CD-DRIVES (if run from Hard disk) gives a message and waits for changing CD and pressing ok then loads CD and exits.

2. Can be used to silently Eject or Load CD-DRIVE(s).

cdchg.exe open x: (opens CD tray of drive x:)
cdchg.exe close x: (closess CD tray of drive x:)
cdchg.exe open (opens all drives)
cdchg.exe close (closes all drives)

3. Ejects CD waits for changing CD loads and checks the given label for correct disc, gets drive letter, and executes given commands.

cdchg.exe "My Label" \install\runonceex.cmd %systemdrive%\install\cleanup.cmd
(checks for label "My Label" if ok pressed runs "x:\instal\runonceex.cmd x:" if cancel pressed runs "%systemdrive%\install\cleanup.cmd")
Note: it returns cd-drive letter to batch file. when used with .exe put -n at the and

cdchg.exe MSOffice "\msoffice\setup.exe TRANSFORMS=office.mst /qb-" %systemdrive%\install\cleanup.cmd -n
(checks for label MSOffice, runs setup.exe from Office CD with unattended transforms)


Fill free to ask question or suggest features

Attached File(s)

  • Attached File  cdchg.zip (100.5K)
    Number of downloads: 644


#20 User is offline   twizt3d 

  • Twizt3d DesignZ
  • PipPip
  • Group: Members
  • Posts: 105
  • Joined: 29-March 04

Posted 02 January 2005 - 06:30 AM

can I run this from cmdlines.txt? if so do you switch back to cd1 to finish installing windows?

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy