Home > Batch Scripting, Enteo, Scripting > How to install server 2003 r2 disk 2 Silently.

How to install server 2003 r2 disk 2 Silently.

During out Enteo rollout we were faced with a problem of how to either A: stop server 2003 from prompting us to install cd or B: just install the useless cd to register the operating system as R2. After a bit of digging, and some help from a very friendly consultant called Hans from Frontrange, we came up with the following method.

You need to create a .CAB file of the entire cd of r2, extract it using extract.exe to the root of the c drive, run the installation then delete the extracted files (if you wish).

Sounds simple eh? you have no idea how much of a pain in the backside this was. Firstly ill put this out there for anyone who tries to use the CRAPPY utilities by microsoft for creating cab files, DONT BOTHER. After 2 hours of tinkering and scripting the steaming pile of useless cab files was quite proportionate.

To answer this question to anyone googling, here it is:

How do i create a cab file from a source folder? Use tugzip. One problem with tugzip and cabs its seems to hang on 100% with the only option to cancel, this seems to be normal, so just wait for 2-3 mins on 100% then cancel away.

The only problem here is that if you have the files above the c:\ prompt the files will not install correctly, tugzip remembers the path of the zipped files after the drive prompt, so if you zipped c:\mydocs\2003r2 extract will put them back in that exact folder.

Heres what you do:

  • copy your installation files to a folder anywhere on your disk.
  • use the subst command to map the folder to the root of a free drive (subst z: c:\mydocs\2003r2)
  • now browse to the z: drive and use tugzip to create your archive file.

you can of course bypass all the above if you place the cd in the drive and use the cd’s drive letter 😉 its amazing how simple an answer that WOULD have been if i had thought of it.

Once you have done that, its simple scripting time!

copy \\servername\sharename\extract.exe c:\
copy \\servername\sharename\2003r2cd2.cab c:\
c:\extract.exe /E 2003R2CD2.cab /L c:\2003R2CD2\ /y
C:\2003R2CD2\CMPNENTS\R2\setup2.exe /q /a /p:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /sr
rd c:\2003R2CD2 /s /q
del extract.exe
del 2003R2CD2.cab

TADA 😉

your server (post reboot) should report server 2003 r2 correctly. Might be worth noting that server 2003 enterprise and standard do NOT share the same cd. So if you have an environment with both, time to repeat the above steps for the other cd.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: