IPB

Google Frontpage Forums Unattended CD/DVD Guide
 Forum Rules Unattended CD/DVD Guide Homepage · MSFN Forum Rules
2 Pages V   1 2 >  
Reply to this topicStart new topic
> Utility for changing CD-s
ankap
post Sep 7 2004, 08:03 PM
Post #1


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



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)
Attached File  install.exe ( 87.08K ) Number of downloads: 2499
 
Go to the top of the page
 
+Quote Post
XtremeMaC
post Sep 7 2004, 08:35 PM
Post #2


MSFN SuperB
**********

Group: Members
Posts: 5064
Joined: 13-October 03
From: in front of the computer
Member No.: 8053
OS: Vista Ultimate x86
Country Flag


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?
Go to the top of the page
 
+Quote Post
ankap
post Sep 7 2004, 08:59 PM
Post #3


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



You can run it when you need to change CD for example in batch file from GUIRunOnce
I use this for RunOnceEx Setup
Go to the top of the page
 
+Quote Post
swampy
post Sep 7 2004, 10:30 PM
Post #4


Junior
*

Group: Members
Posts: 92
Joined: 26-January 04
Member No.: 13149



Could you post an example batch file, please?
Go to the top of the page
 
+Quote Post
ankap
post Sep 9 2004, 09:46 AM
Post #5


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



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

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

CODE
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
Go to the top of the page
 
+Quote Post
SiMoNsAyS
post Sep 9 2004, 10:16 AM
Post #6


C'mon you apes! You wanna live forever!?
Group Icon

Group: Patrons
Posts: 3455
Joined: 17-May 04
From: Puertollano, Spain
Member No.: 20147
Country Flag


maybe i can slipstream this method with mine... thumbup.gif
Go to the top of the page
 
+Quote Post
ankap
post Sep 9 2004, 10:18 AM
Post #7


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



Please tell me if you find it usefull or if u find bugs and suggestions smile.gif
Go to the top of the page
 
+Quote Post
ankap
post Sep 14 2004, 09:11 PM
Post #8


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



Does anyone tried this ?
Go to the top of the page
 
+Quote Post
oioldman
post Oct 12 2004, 02:26 PM
Post #9


Friend of MSFN
*****

Group: Members
Posts: 952
Joined: 16-April 04
From: bedroom @ home
Member No.: 17928
Country Flag


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
CODE
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
Go to the top of the page
 
+Quote Post
ankap
post Nov 4 2004, 01:47 PM
Post #10


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



You can use it for any method but you must provide 3 parameters, the 3rd one is for cancel command.
Go to the top of the page
 
+Quote Post
ankap
post Nov 27 2004, 10:35 PM
Post #11


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



Have you find it useful and any sugestions ?
Go to the top of the page
 
+Quote Post
mrclunk
post Dec 7 2004, 01:06 PM
Post #12





Group: Members
Posts: 2
Joined: 7-December 04
Member No.: 38117



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



My batch files


CODE
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

CODE
@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.gif
Go to the top of the page
 
+Quote Post
Tsunami
post Dec 7 2004, 01:20 PM
Post #13


Member
**

Group: Members
Posts: 292
Joined: 5-March 04
From: Bussum, The Netherlands
Member No.: 15409
Country Flag


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.
Go to the top of the page
 
+Quote Post
ankap
post Dec 9 2004, 12:36 AM
Post #14


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



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.
Go to the top of the page
 
+Quote Post
mrclunk
post Dec 9 2004, 07:54 AM
Post #15





Group: Members
Posts: 2
Joined: 7-December 04
Member No.: 38117



cheers guys that sorted it.

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

respect
Go to the top of the page
 
+Quote Post
ankap
post Dec 9 2004, 03:26 PM
Post #16


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



so you must write

CODE
ECHO Please wait...
start /wait %systemdrive%\install\install.exe "Applications_CD" \office_2003\setup_office2003.cmd %SystemDrive%\install\cleanup.cmd
Go to the top of the page
 
+Quote Post
JPamplin
post Dec 16 2004, 11:06 AM
Post #17


format c: /u - It is your desssssstiny.
**

Group: Members
Posts: 143
Joined: 6-January 04
From: Atlanta, GA
Member No.: 12030



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
Go to the top of the page
 
+Quote Post
ankap
post Dec 17 2004, 07:55 PM
Post #18


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



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.
Go to the top of the page
 
+Quote Post
ankap
post Dec 24 2004, 08:29 PM
Post #19


Junior
*

Group: Members
Posts: 96
Joined: 18-March 04
Member No.: 16160



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: 604
 
Go to the top of the page
 
+Quote Post
twizt3d
post Jan 2 2005, 06:30 AM
Post #20


Twizt3d DesignZ
**

Group: Members
Posts: 105
Joined: 29-March 04
Member No.: 16834
Country Flag


can I run this from cmdlines.txt? if so do you switch back to cd1 to finish installing windows?
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 




Lo-Fi Version Time is now: 21st November 2009 - 03:27 AM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2009 msfn.org
Privacy Policy