Sign in to follow this  
Followers 0
SiMoNsAyS

[How To] Use multiple CDs on your setup

56 posts in this topic

Introduction

From a time to now I've used a little batch that let me change between CDs during Windows setup.

Lately I've improved the batch enough to be released.

Features

Unattended! - No user intervention during the process.

Small size - 300 kb are enough; just some batch files and a self-extacting archive.

Easy to use - Fill some lines and burn!

Professional look - A simple RunOnce window look.*

*CMDOW is necessary for this

Things You Need

·Understand the process: Basic batch coding and basic RunOnce knowledge.

·CMDOW is optional but totally recommended to give the process a clean look.

·A simple text-editor. Notepad is ok.

How It Works

After the RunOnce process finish the tool will give you a minute to change between media (CD or DVD doesn't matter).

If correct CD is inserted then a batch file will run from it installing your applicacions. Once the batch finished, you'll be given another minute to insert your Windows CD.

In case you want to skip this step there's no problem, all the process will run unattended and you won't need to press any button.

GUI / Interface

As said, there's no buttons you need to press. You'll only see a RunOnce window and a line advertising you to insert the CD/DVD. [image 1]

CMDOW is used to hide the command prompt window (recommended), or if you're not picky you can just left the command window. [image 2]

How To

Download the compressed archive and extract it. You'll find two folders, uAxp\ and uAapps\.

uAxp\ is the root of your Windows setup disc (notice where's placed the $OEM$ folder). In a similar way, uAapps\ is the root of your applications CD or DVD.

Add the applications installed from your Windows CD to uAxp\RunOnceEx.cmd, this batch file is necessary to be launched from cmdlines.txt. Then edit uAapps\Setup.cmd to add the applications you're going to install from the other media.

That's all.

What If...?

... you don't insert the other media: Installation will stop for one minute, if the necessary CD/DVD is not found, setup will continue and you won't even need to press any button.

... you insert the disc on other drive: Installation will stop for one minute, Setup.cmd on the root of the media inserted will be run (all your apps will be installed without user intervention if you include the necessary silent parameters). The tool will wait an additional minute after everything is installed and Windows setup will continue...

... you insert the disc on the same drive: Same from above, but at the final pause you'll need to switch the discs on 1 minute.

... you place the necessary files on a HD: You'll be able to install any application. This is useful if you have space problems and you don't own a DVD or DVD burner.

Images

uAapps_RunOnce.png [image 1]

uAapps_Command.png [image 2]

F.A.Q.:

Q) C: drive is present, why?

A) For upgrading purposes, because if after some years you decide to create a new DVD or you want to install your applications from C:\ you can do it.

If you don't want to remain in front of the monitor and you only have one CD reader, this will be your solution.

Q) Can I increase/decrease the wait time?

A) Yes, take a look at pause.cmd inside uAxp\$OEM$\uAapps.exe and just change a 2 digits number.

I'm not a geek of batch files so if you think you can improve it, feel free to contact me.

MORE TO BE WRITTEN...

CD_DVD_Switcher.zip

Edited by SiMoNsAyS
0

Share this post


Link to post
Share on other sites

i should point out, you you're going to either switch the CD 4 times, or some hefty tidbits.

but on a more technical side....let me write up some code for you to test with.

0

Share this post


Link to post
Share on other sites
i should point out, you you're going to either switch the CD 4 times, or some hefty tidbits.

if it doesn't fail my time line... it will wait a few time until check the cd:

if it find's the file, variable it's established and setup installs office

if it don't finds it will continue installation bucause the variable it's not established

also it waits a time for you to switch the cd, but if both are inside 2 different units it will be no problem

is this true? or there is a mistake, dunno...

but on a more technical side....let me write up some code for you to test with.

waiting... :):lol::w00t:

0

Share this post


Link to post
Share on other sites

I think I got everything you wanted, sorta.

RunOnceEX.cmd

REM CMDOW @ /HID
CLS
TITLE Importing RunOnceEX Entries


IF EXIST D:\CD1.txt set XPCD=D:
IF EXIST E:\CD2.txt set XPCD=E:
IF EXIST F:\CD3.txt set XPCD=F:
IF EXIST G:\CD4.txt set XPCD=G:
IF EXIST H:\CD5.txt set XPCD=H:
IF EXIST I:\CD6.txt set XPCD=I:
IF EXIST J:\CD7.txt set XPCD=J:

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

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

REG ADD %KEY%\005 /VE /D "Adobe Reader 6" /f
REG ADD %KEY%\005 /V 1 /D "%XPCD%\install\AdobeReader6\AR6.msi /qn" /f

REG ADD %KEY%\010 /VE /D "Alcohol 120" /f
REG ADD %KEY%\010 /V 1 /D "%XPCD%\install\alcohol\setup.exe /qn" /f
REG ADD %KEY%\010 /V 2 /D "REGEDIT /S %XPCD%\install\alcohol\register.reg" /f

REG ADD %KEY%\015 /VE /D "Diskeeper 8" /f
REG ADD %KEY%\015 /V 1 /D "%XPCD%\install\DiskeeperPro_8.0.459.exe /s /v/qn" /f

REG ADD %KEY%\018 /VE /D "Microsoft Office 2003" /f
REG ADD %KEY%\018 /V 2 /D "%XPCD%\install\changecd.cmd" /f
REG ADD %KEY%\018 /V 1 /D "%XPCD%\install\Office\setup.exe TRANSFORMS=\"%XPCD%\Install\Office\office.mst\" /qn" /f
REG ADD %KEY%\018 /V 3 /D "%XPCD%\install\changecd.cmd" /f

REG ADD %KEY%\020 /VE /D "DU Meter 3" /f
REG ADD %KEY%\020 /V 1 /D "%XPCD%\install\dumeter3.exe /VERYSILENT /SP-" /f

REG ADD %KEY%\025 /VE /D "IsoBuster 1.5" /f
REG ADD %KEY%\025 /V 1 /D "%XPCD%\install\IsoBuster1.5.exe /VERYSILENT /SP-" /f
REG ADD %KEY%\025 /V 2 /D "taskkill /F /IM isobuster.exe" /f

REG ADD %KEY%\030 /VE /D "Kerio Personal Firewall 2.1.5" /f
REG ADD %KEY%\030 /V 1 /D "%XPCD%\install\KPF\Setup.exe -s" /f

REG ADD %KEY%\035 /VE /D "MDAC 2.7 SP1 Hotfix" /f
REG ADD %KEY%\035 /V 1 /D "%XPCD%\install\mdac\mdac.cmd" /f

REG ADD %KEY%\040 /VE /D "MSN Messenger 6.1" /f
REG ADD %KEY%\040 /V 1 /D "%XPCD%\install\MSN_Messenger_6.1.0202.msi /qn" /f

REG ADD %KEY%\045 /VE /D "Nero Burning ROM 5.5" /f
REG ADD %KEY%\045 /V 1 /D "REGEDIT /S %XPCD%\install\nero\register.reg" /f
REG ADD %KEY%\045 /V 2 /D "%XPCD%\install\Nero\Nero551054.exe /silent /noreboot" /f

REG ADD %KEY%\050 /VE /D "Importing Registry Tweaks" /f
REG ADD %KEY%\050 /V 1 /D "REGEDIT /S %XPCD%\install\regtweaks.reg" /f

REG ADD %KEY%\055 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\055 /V 1 /D "%XPCD%\install\cleanup.cmd" /f

EXIT

changecd.cmd

CMDOW @ /HID
CLS
TITLE Changing CD

IF EXIST D:\CD1.txt set XPCD=D:
IF EXIST E:\CD2.txt set XPCD=E:
IF EXIST F:\CD3.txt set XPCD=F:
IF EXIST G:\CD4.txt set XPCD=G:
IF EXIST H:\CD5.txt set XPCD=H:
IF EXIST I:\CD6.txt set XPCD=I:
IF EXIST J:\CD7.txt set XPCD=J:

COPY /Y %XPCD%\Install\cd_prompt.vbs C:\cd_prompt.vbs
CDR.EXE open %XPCD%
start /wait wscript C:\cd_prompt.vbs
CDR.EXE close %XPCD%
DEL /Q /F C:\cd_prompt.vbs

EXIT

cd_prompt.vbs

MsgBox "Please insert CD2. When the drive is done flashing, press OK" , vbOKOnly, "Please Replace CD"

So here's what it does....theoretically anyway (haven't tested)

RunOnceEX.CMD imports the neccesary entries. Upon restart RunOnceEX will run...

when it gets to the Office 2003 (can be any program realy), changecd.cmd will run in the background, and all you should see is a prompt saying "Please insert CD2. When the drive is done flashing, press OK", while at the same time, the CD rom drive %XPCD% should eject to replace the CD. (Note, I didn't code this to allow for more then one CDROM in use, if you have more then one, then you could just add more IF EXIST at the begining of RunOnceEX.cmd to check for a file on the second CD and change the variable accordingly) When you press OK on the prompt, the CDROM should reinsert. and Office will install. Then changecd.cmd runs again, to get the original CD back (can be left out if the rest of your RunOnce is from second CD, or it's the last entry. Just keep track if you need the original CD)

Did I leave anythign out? CDR.EXE can be found form teh download section of the Unattend site.

0

Share this post


Link to post
Share on other sites

Execuse me. Are these correct or just typos?

REG ADD %KEY%\018 /VE /D "Microsoft Office 2003" /f

REG ADD %KEY%\018 /V 2 /D "%XPCD%\install\changecd.cmd" /f

REG ADD %KEY%\018 /V 1 /D "%XPCD%\install\Office\setup.exe TRANSFORMS=\"%XPCD%\Install\Office\office.mst\" /qn" /f

REG ADD %KEY%\018 /V 3 /D "%XPCD%\install\changecd.cmd" /f

0

Share this post


Link to post
Share on other sites

most likely typos.... :P

REG ADD %KEY%\018 /VE /D "Microsoft Office 2003" /f
REG ADD %KEY%\018 /V 1 /D "%XPCD%\install\changecd.cmd" /f
REG ADD %KEY%\018 /V 2 /D "%XPCD%\install\Office\setup.exe TRANSFORMS=\"%XPCD%\Install\Office\office.mst\" /qn" /f
REG ADD %KEY%\018 /V 3 /D "%XPCD%\install\changecd.cmd" /f

but like I said, I didn't test this :P

0

Share this post


Link to post
Share on other sites

i've write a piece of code let me know if this can work (red is untested)

deleted :D

needed for this to work, sleep.exe on system32

0

Share this post


Link to post
Share on other sites

I think Alanoll's should work fine. Also, I think there's no point in setting two variables for the same drive.

0

Share this post


Link to post
Share on other sites
I think Alanoll's should work fine. Also, I think there's no point in setting two variables for the same drive.

because it's not the same drive, if D: has \$OEM$\BioHaZaRD.nfo will be %CDROM% and if E: has \Unattended.mst will be %OFFICE%. with Alanoll's code you HAVE to change between CDs, with mine (if it's ok :P ) you can change between CDs for a minute and if they are in different drives you DON'T HAVE to.

ps: thanks Alanoll you give me the piece of code i needed

0

Share this post


Link to post
Share on other sites
because it's not the same drive, if D: has \$OEM$\BioHaZaRD.nfo will be %CDROM% and if E: has \Unattended.mst will be %OFFICE%. with Alanoll's code you HAVE to change between CDs, with mine (if it's ok  ) you can change between CDs for a minute and if they are in different drives you DON'T HAVE to.

ps: thanks Alanoll you give me the piece of code i needed

Your code has the problem that mine has a way to get around. Yours will ONLY work if you have BOTH CDs in at CMDLINES.TXT otherwise, as you said before it will just skip over Office.

In yours, even though you set %OFFICE%, you won't be able to change CDs. RunOnceEX and all variables are expanded at the time of importing. If the variable is supposed to change, RunOnceEX does NOT take this into account, as the CMDLINE expands the variables before importing into the registry so they get inported as D:\setup.exe or whatever, NOT %OFFICE%\setup.exe

Your for statements are fine (though C: really shouldn't be neccesary :P )

All your's does is stall for 30 seconds, then runs Office setup IF the CD was in the CDROM when RunOnceEX was executed and the CDROM hasn't changed. This negates being able to change CDs but rather the CDs HAVE TO STAY IN THE DRIVE. However..... If you were to do something like I did, and call a batch file (inplace of the Office setups and sleep) THEN find teh Office CDROM, THEN EXECUTE from the same batch it will work (even if the CDROM is NOT in the drive when RunOnceEX is)

and just to reiterate how RunOnceEX works. All that is happening when RunOnceEX.cmd is executed, is the %VALUE% is getting expanded to whatever is assigned to it (D: or whatever) and THEN imported into the registry as fixed strings. Upon restart is when the actual actions governed by the entries is executed.

0

Share this post


Link to post
Share on other sites

@Alanoll very very interesting... i thought that the %VALUE% was imported to registry not the expanded path...

also i've found another glitch, if you change the CDs in the same CD reader after %OFFICE% the value %CDROM% doesn't have any effect because it's not restored, don't know if you can understand me...

anyway i know how to solve it, the solution it's just transform it in to a .cmd file and run it in the early stage of installation, from cmdlines.txt. i've got something in mind, when i'll come back i'll write again... until that, anyone would like to apport another solution... :D

0

Share this post


Link to post
Share on other sites

I still kinda like mine....and in theory it's solid. In theory atleast.

What exactly are you trying to do, and I can try again...

0

Share this post


Link to post
Share on other sites

from cmdlines.txt call a office2003.cmd

office2003.cmd:

deleted :D

i think this is enought, also it can be used a IF ERROR GOTO: and don't use the second pause but i don't know how to do it.

0

Share this post


Link to post
Share on other sites

you really shouldn't technically install applications from CMDLINES.TXT especially ones that are heavy registry entry buggers like Office. The reason, the registry is VERY transitive during setup, and isn't finalized untill the VERY end of it, so ALOT of changes made aren't saved.

however, you could just call that CMD file in your normal RunOnceEX routine instead of calling setup directly, just an idea.

0

Share this post


Link to post
Share on other sites

ok i'll try first way from cmdlines.txt and if it doesn't work i'll try tha call from runonceexe. many thanks alanoll :thumbup , if you find another solution please let me know it :D

edited: someone can correct this one?

deleted :D
0

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.