Jump to content

How give option in OSC to install Office2003 via RIS?


Recommended Posts

Hey all.

Does anyone have any simple examples of what I would need to do to add an option in one of the OSC files to install Office 2003 and then have it auto install once the RIS install was done?

I've tried googling for the answer and searched here but I haven't found any answer. If I knew how to do this, I could do this with any other apps too provided they had a full unattended setup option via the command line.

Thanks for any information anyone might have for me.

-Allistah

Link to comment
Share on other sites


Well you really have a few choices in order to accomplish what you want. First you could make multiple flat images and have one of them install Office while the other would not. Second, and this is by far my preferred method, you could "prestage" your target RIS clients into organizational units (OU) and assign Office to the appropriate OU. Last, you could utilize what is known as RIPrep, which is basically the RIS version of sysprep. I works very similar to Ghosting a computer.

The first option would be quite similar to what you would normally do with a CD based unattended install. The second method follows what I consider to be known and prescribed. It follows Microsoft's way of doing things. The last method, while it certainly has it's followers, has never given me anything but grief. I gave up using sysprep years ago because cloning a complete installation has never been without problems in my experience.

Edited by RogueSpear
Link to comment
Share on other sites

Hm, I thought there might be a way to put a command in the RunOnce or something and have that kick off the unattended setup of Office. Is that not the right way to do it or is that not possible? Here at work they have something like that and I wish I could figure out how they did it. They have the option to install Office in the OSC file, and then when Windows is done installing, the Office setup kicks off and does it's install. Any idea how they did this?

Link to comment
Share on other sites

Certainly, installing Office from RunOnceEx is an option. In fact it would work out just like a CD based install. The difference being that you would need to point to the source somewhere on the network or place the source inside $OEM$\$1 so that it makes it to your system drive for installation.

When you mentioned OSC, I took that to mean the RIS choice screens when you PXE boot. Where do you see this option by the way?

Link to comment
Share on other sites

Hi,

From what you've said, I suspect that your company has created several seperate builds or SIF files which oschoice.osc is then displaying giving several install options. e.g.

Win XP

Win XP + Office 2003

etc.

If this is the case then no editing of any OSC file is required. I'll assume these are flat RISETUP images and not RIPREP based. There are now two methods of continuing:

Method 1:

When you choose one of the options you select a particular SIF file - which if I did it (not that I would do it this way at all!) would have an entry in [GUIRunOnce] something like below for the "+ Office 2003" option:

command1=%systemdrive%\reg_add.cmd

The reg_add.cmd file would simply contain something like:

REGEDIT /S "office_run.reg"

and office_run.reg would be the RunOnce registry entry you'd need to import to get office install started. Phew! (you could skip the reg_add.cmd file and insert the command directly into the SIF file, but I find using a batch file easier to manage and less prone to error).

Now, as RogueSpear suggested, you'd need the office source somewhere local like a folder on C: Putting it in the $OEM$\$1 RIS folder on the server sounds like your best bet. As well as this you'll need the "reg_add.cmd" and "office_run.reg" files to the same folder.

Method 2:

Almost the same as method 1 except instead of using [GUIRunOnce] in the SIF file to insert the necessary registry entry, you use a "cmdlines.txt" file located in the $OEM$ folder. This file should just contain the lines:

[COMMANDS]
"reg_add.cmd"

You should again use the same content as method 1 for reg_add.cmd - making sure to place it as well as office_run.reg in the $OEM$ folder.

If you had to go about running office in this way then I'd use method 2. Personally I use AD and SMS, but that's not an option for many people because of the expense! (the company pays, not me ;))

It's late here so I may have made a schoolboy error or two - or simply missed the point altogether :P

Good luck,

Andy

Edited by Fencer128
Link to comment
Share on other sites

  • 4 weeks later...

Why not just add the options (and resulting variables) to the OSChooser screens, and then pull that variable into setup and go from there? It's much easier than maintaining multiple images or doing post-install scripting (other than the runonceex scripting most of us already do).

You could add the options and variables somewhere like customopt.osc (like so:)

<OSCML>
<META KEY=F1 HREF="CUSTOPTH">
<META KEY=F3 ACTION="REBOOT">
<META KEY=ESC HREF="CHOICE">
<TITLE> Client Installation Wizard Advanced Options</TITLE>
<FOOTER> [ENTER] Continue [ESC] Go back [F1] Help [F3] Restart computer</FOOTER>
<BODY left=5 right=75>
<BR>

Type a valid entry to install desired options - these are located within the parenthesis. Default settings will install if left blank.
Press ENTER to continue.
<BR>
<BR>


<FORM ACTION="oschoice-xp">
<BOLD>Settings:</BOLD><BR>
Amount of Memory......... <INPUT NAME="Memory" SIZE=5 MAXLENGTH=5 Value="1GB+"> (1GB+, 768MB, 512MB, 256MB)<BR>
Software Suite........... <INPUT NAME="Software" SIZE=6 MAXLENGTH=6 Value="None"> (Office_XP, Office_2003, None)<BR>
Install Admin Software... <INPUT NAME="Admin" SIZE=3 MAXLENGTH=3 Value="No"> (Yes, No)<BR><BR>
<BOLD>Example: </BOLD>
Software Suite.... None<BR>
<BR>
</FORM>

</BODY>
</OSCML>

Then, use the variable from the .osc file in the appropriate place in the RIS .sif file to pull them through (like so):

[SetupParams]
UserExecute="%systemdrive%\temp\unattend.cmd %MEMORY% %SOFTWARE% %ADMIN%"

And then, in the unattend.cmd file, you would set them for use (like so - I use the registry, but any use of the variable can be done, I just like a permanent solution):

:// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
://
:// Passing variables from RIS to registry

reg add HKLM\Software\Microsoft\Unattend /v memory /t REG_SZ /d %1 /f
reg add HKLM\Software\Microsoft\Unattend /v software /t REG_SZ /d %2 /f
reg add HKLM\Software\Microsoft\Unattend /v admin /t REG_SZ /d %3 /f

reg query HKLM\Software\Microsoft\Unattend /v memory > memory
for /f "tokens=3 skip=3" %%1 in (memory) do set office=%%1

reg query HKLM\Software\Microsoft\Unattend /v software > software
for /f "tokens=3 skip=3" %%1 in (software) do set memory=%%1

reg query HKLM\Software\Microsoft\Unattend /v admin > admin
for /f "tokens=3 skip=3" %%1 in (admin) do set software=%%1

:// Set paging file

regedit /s %sourcepath%\UNATTEND\%memory%.reg

Once you've set the variables, you can reg query them and act on them in any way you'd like, in any other script you'd like (if they're set in the registry, they don't die with the script).

It's a bit of a pain to set up initially if you don't know how to pull variables through past GUI mode setup, but it can be done. These are just examples, you can do almost anything you'd like as a variable if you write the files and script options to "pull them through".

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...