Office 2007 Deployment: Free Delivery (preparing for a silent deployment with cacheing)

| No Comments
| More

So after deciding whether those files we found with potential Office 2007 compatibility issues required intervention on the part of the users, aided or not by relevant support personnel, and then sorting them out, we now begin crossing the river of digital darkness and deploying Office 2007 itself to the end users' workstations.

Now there are going to be situations where you have to deploy out to satellite offices like we do. You may have the situation where the WAN links are not quite what they should be and the best you've got to work with is an ADSL link back and forth for data transmission. If a great number of people ran the Office install from the one central location you've got for the files over that link, they will cry due to the slow response!

So to avoid having to comfort the masses in order to prevent them from losing the will to live, you can mitigate this risk by having a local install source at each site. You've got the choice of a local file server share or even the user's workstation to store the files, basically as long as they can reach them, you should be fine.

Now after deciding on the merits of both, we have gone down the road of caching the files on the local user's machines from a hidden network share.

Now you can be lazy and just copy the files across from the Office 2007 media to the local C: drive of the user's machines. However we don't want to do that as that would leave a copy of the media on the user's machines which they could just take away themselves (granted without the license key, but still not ideal).

So instead, we going to use via the KIX logon script an option from the Office CD, handy that...

Now in order to silently deploy out Office 2007 along with the service pack we require, all while the users can still use their machine in the background, we're going to need to do a few alterations to what's there already.

Now we've got the Office 2007 media stored on a central network location (\\server\office2007$) in order to be cached out to user's workstations and this is the folder stucture you can expect:

officecontents.gif

The "Updates" folder is where we are going to store the Office 2007 service pack files to be installed when Office gets installed. Right now, Service Pack 1 is the most up to date pack released so that is what we are using. After downloading the file from Mircosoft, we have to extract the msp files contained within and place them within the "Updates" folder.

To do that, we'll use a command line:

office2007sp1-kb936982-fullfile-en-us /extract:C:\SP1

which will extract the files in this example to C:\SP1 and from there you have the contents to copy into the Updates folder. So Office with SP1 is all sorted. I do have to say that this is only good for the initial install, you will still have to deploy SP1 and other updates via other methods such as direct from Windows Update, WSUS, Patchlink etc.

Now we need to find an XML file within the media to alter so that the office setup will only copy across the required files to a hidden folder on whichever drive has the most free disk space called "MSOCache". It's just a handy folder MS employ to use as the local install source. The thing is, our workstations only have a c:\ drive as a hard disk to use so if anything that's where the folder will be.

Do a search for "config.xml" and hopefully you will find it. I suggest this method of looking for the file as it depends what version of Office you are using as to where it's located. It would be advisable that you make a copy of that file in a different location so then that is the one you alter and if all goes wrong, then you have the original to play with again.

So we'll copy that file into another folder called Configs (as I'm going to put other files in there later on) and we'll open it up. This is an example of what you will see:

<Configuration Product="Standard">

 <!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> -->
 
 <!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Standard Setup(*).txt" /> -->
 
 <!-- <PIDKEY Value="BCDFGHJKMPQRTVWXY2346789B" /> -->

 <!-- <USERNAME Value="Customer" /> -->
 
 <!-- <COMPANYNAME Value="MyCompany" /> -->
 
 <!-- <INSTALLLOCATION Value="%programfiles%\Microsoft Office" /> -->
 
 <!-- <LIS CACHEACTION="CacheOnly" /> -->
 
 <!-- <SOURCELIST Value"\\server1\share\Office12;\\server2\share\Office12" /> -->
 
 <!-- <DistributionPoint Location="\\server\share\Office12" /> -->
 
 <!-- <OptionState Id="OptionID" State="absent" Children="force" /> -->
 
 <!-- <Setting Id="Reboot" Value="IfNeeded" /> -->
 
 <!-- <Command Path="msiexec.exe" Args="/i QuietArg="/q" ChainPosition="after" Execute="install" /> -->

</Configuration>

All looks rather complicated...almost tempted to pack it in right now and hide...!

But, no, fear not, for we are almost done! There are two lines that we can alter so we achieve our goal, the line with  <!-- <LIS CACHEACTION="CacheOnly" /> --> and the other line with <!-- <Setting Id="Reboot" Value="IfNeeded" /> -->

That cacheaction basically sets in motion the job of placing all the files into that MSOCache folder and the other is just to make sure the machine doesn't reboot after the job is complete (even though it shouldn't anyway)

So all we do to bring those into play is remove the <!-- and the --> from the beginning and end of each of those lines and also change that reboot setting to Never so we end up with something like this:

<Configuration Product="Standard">

 <!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> -->
 
 <!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Standard Setup(*).txt" /> -->
 
 <!-- <PIDKEY Value="BCDFGHJKMPQRTVWXY2346789B" /> -->

 <!-- <USERNAME Value="Customer" /> -->
 
 <!-- <COMPANYNAME Value="MyCompany" /> -->
 
 <!-- <INSTALLLOCATION Value="%programfiles%\Microsoft Office" /> -->
 
 <LIS CACHEACTION="CacheOnly" />
 
 <!-- <SOURCELIST Value"\\server1\share\Office12;\\server2\share\Office12" /> -->
 
 <!-- <DistributionPoint Location="\\server\share\Office12" /> -->
 
 <!-- <OptionState Id="OptionID" State="absent" Children="force" /> -->
 
 <Setting Id="Reboot" Value="Never" />
 
 <!-- <Command Path="msiexec.exe" Args="/i QuietArg="/q" ChainPosition="after" Execute="install" /> -->

</Configuration>

Now we're cooking with the petroleum product of your choice, which leaves us with creating that all important batch file to run the set-up which kicks it all off, which will be the setup.exe followed by the reference to the config.xml file as illustrated below:

"\\server\Office2007$\setup.exe" /config "\\server\Office2007$\configs\config.xml"

So that will complete the process from start to finish.

However there is now a little thing which may cause discomfort. Without anything to show that this had already completed, every time the script would run, this process would kick in and so to speed things up a bit, we need something to look for on the local machine the KIX script would run on to show that all was well. This can be a text file or a reg change, whichever way you would prefer to do it.

Because we're being lazy here, we'll stick to a text file for now. You may want to copy the file to a new directory to keep this in as there will be other files down the line.

So now we have a full batch file with the required parameters. So now we need to add that to the logon script at long last;

If not exist ("C:\OfficeTrack\officecopied.txt")
Shell "
\\server\Office2007$\liscache.bat"
      if @error = 0
      ? "Office Preparation complete"
           if not exist ("C:\OfficeTrack")
           md "C:\OfficeTrack"
           endif
   Copy "
\\server\office2007$\officecopied.txt" "C:\OfficeTrack"
 endif
Else
? "Office 2007 Files have already been copied to your workstation"
endif

So here if that text file doesn't exist, it runs the batch file and afterwards if all is well (which is looked at with the @error = 0 option under KIX), the script copies the text file across so then next time the script runs, the batch file execution is bypassed. If you place this below other things like drive mappings then the rest of the script will run and the users should be able to carry on with work while the copy process runs in the background. Fantastic!

Next time we arrive at customising Office install options before we finally install Office on users' workstations.

Leave a comment

About this Entry

This page contains a single entry by Paul Hughes published on January 5, 2009 9:58 AM.

Who will trust MS now? was the previous entry in this blog.

Office 2007 Deployment: Modify the van... (the Office 2007 Customization tool) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

Category Archives

 

-- Advertisement --