Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

[How To] Use multiple CDs on your setup

- - - - -

  • Please log in to reply
55 replies to this topic

#1
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
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
Posted Image [Image 1]

Posted Image [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...

Attached Files


Edited by SiMoNsAyS, 21 May 2005 - 08:14 AM.



How to remove advertisement from MSFN

#2
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
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.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#3
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04

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:

#4
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
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.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#5
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,952 posts
  • Joined 12-January 04
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


Posted Image

#6
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
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
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#7
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
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

#8
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,952 posts
  • Joined 12-January 04
I think Alanoll's should work fine. Also, I think there's no point in setting two variables for the same drive.
Posted Image

#9
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04

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

#10
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03

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.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#11
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
@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

#12
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
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...
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#13
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
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.

#14
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
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.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#15
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
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



#16
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
i think i finally got it, go to first post for details :lol:

#17
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
you could include my VBS if you wanted, replace the SLEEP that way there is a visual prompt that they have to click when they're done. True it will disable the unattend, but for the people that don't have two CDROMS that will disable the unattend as well, as they'd have to be present to install Office.


you could also use ping, and ping the localhost to cause the sleep as well.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#18
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
about people that don't have 2 cdroms, they can just copy the office installation cd to C:\ and it will still work :D but what if that people don't have enought space or simply don't want to?? i'll add a paragraph :P
about ping i dunno how to use it :no:

#19
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
i've found a way to pause the script for 1 minute using the ping command

start /wait PING -n 61 127.0.0.1>nul

this will let us a minute or so, problem now it's that the new cmd window it's visible and annoys me, do any1 know how to hide it??

#20
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
Guide updated!, no need for sleep.exe anymore! :thumbup

#21
mssaad66

mssaad66

    Junior

  • Member
  • Pip
  • 57 posts
  • Joined 09-June 04
Hi…
Can I add my way for the 2nd CD….. I've made exe file and it's work fine now….the way is very easy just you need to change the file name you wont to setup it in the .cmd file and put that .cmd file on your %systemdrive% by any way you like.. as $OEM$ or other ways just it must to be on the %systemdrive% at the time you went to setup programs from the 2nd cd ….and you need also cd2.txt to be on the root or the 2nd cd, so just we need this 4 (CD2.txt + 2NDCD.cmd + cdeject.exe + cdr.exe) files….
I'll put them at all in the attachments, just you need to edit the .cmd as you need

2NDCD.cmd:

cls
@ECHO OFF
ECHO.
SET CDROM2=
IF EXIST D:\CD2.txt SET CDROM2=D:
IF EXIST E:\CD2.txt SET CDROM2=E:
IF EXIST F:\CD2.txt SET CDROM2=F:
IF EXIST G:\CD2.txt SET CDROM2=G:
IF EXIST H:\CD2.txt SET CDROM2=H:
IF EXIST I:\CD2.txt SET CDROM2=I:
IF EXIST J:\CD2.txt SET CDROM2=J:
IF EXIST K:\CD2.txt SET CDROM2=K:
IF EXIST L:\CD2.txt SET CDROM2=L:
IF EXIST M:\CD2.txt SET CDROM2=M:
IF EXIST N:\CD2.txt SET CDROM2=N:

IF EXIST %CDROM2%\CD2.TXT GOTO RUN
cls
:RUN
ECHO.
start /wait %CDROM2%\SETUP.exe TRANSFORMS=Unattended.MST /qb-
cls
ECHO.
EXIT

This ismine it is just for the Office, so you can your program here…also I must to tell you that the .cmd file will work in hide mood so you'll not see the Dos black screen
And this is my way to call it also…..
Runonceex.inf:

HKLM,"%RunOnceEx%\install13",,,"13- Please Insert CD 2"
HKLM,"%RunOnceEx%\install13",1,,"%10%\Apps4\CDR.exe open ALL"
HKLM,"%RunOnceEx%\install13",2,,"%10%\Apps4\cdeject.exe"

I hope that it help you,,,Tell me about it if it work with you or not……

Attached Files



#22
mssaad66

mssaad66

    Junior

  • Member
  • Pip
  • 57 posts
  • Joined 09-June 04
This is also the main script you can edit as you want and you can convert it to exe with the AutoIt
www.hiddensoft.com/AutoIt

Attached Files



#23
SiMoNsAyS

SiMoNsAyS

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

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
LoL, also this method can be applied to other program or many programs. the administrative installation of office don't take a full cd so i'm thinking on adding photoshop or any other program to the list, just placing this lines on the script:
start /wait %OFFICE%\SETUP.exe TRANSFORMS=Unattended.MST /qb-
start /wait %OFFICE%\ApplicationDir01\Application01.exe
start /wait %OFFICE%\ApplicationDir02\Application02.exe
start /wait %OFFICE%\ApplicationDir..\Application...exe
:thumbup

#24
mssaad66

mssaad66

    Junior

  • Member
  • Pip
  • 57 posts
  • Joined 09-June 04
That is right for that I've add the main script (2ND CD.AUT) to change what you like of description of the 2nd CD& Names of programs..........in this case you must to edit teh .CMD file and .EXE

#25
wookieNZ

wookieNZ
  • Member
  • 5 posts
  • Joined 11-September 04
Hi all,


Thanks very much for work done so far. I am currently trying for a 2 CD unattended install but am tripping up when changing CD's. Using Virtual PC when i change over the cd in the "capture iso" menu it cant find the office file on the new cd.

I have attached the my RunonceEx.cmd file, it is basiacally the same as Alanolls post on page 1.

My files are located on my D:\unattendedxp\xpcd\ folder and officexp (acutally 2003 but not splitting hairs) is located in the \xpcd\$OEM$\$1\applications\officexp dir.

The VB script works find to eject the cd etc (vitrual in this case) however just doesnt find the setup.exe for office on the next cd. I have cd1.txt and cd2.txt in the root of both the ISO cd's.

Any ideas?

Thanks.

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users