Office 2007 Deployment: The Main Script Part 1

The most important part of all this is how we are going to deploy all this in the first place, which of course as mentioned in earlier blog posts is the kix based logon script. But in order to do without enough resilence for the script to continue in the event that things go wrong, we’re going to need some cunning and evil henchmen to do the dirty work.

The henchmen take the form of variables within KIX and we will make extensive use of those in order to achieve our aims. So begin, we’ll start with the opening section:

;*** This Part of the Script will contain the Office 2007 deployment script text
;** This will run before the rest of the script on normal machines to avoid issues as much as possible  **

? “Running Job for Office 2007 preparation”
? “Please be patient, this may take some time…”

Select
Case InGroup(“Office2007DeploymentPhase1”)
 ? “You are a member of the Office 2007 Rollout Group”
 $officeinstall = “1”
Case InGroup(“Office2007DeploymentPhase2”)
 ? “You are a member of the Office 2007 Rollout Group 2”
 $officeinstall = “1”
Case InGroup(“Office2007DeploymentPhase3”)
 ? “You are a member of the Office 2007 Rollout Group 3”
 $officeinstall = “1”
Case InGroup(“Office2007ProDeployment”)
 ? “You are a member of the Office 2007 Pro Rollout Group”
 $officeinstall = “2”
case 1
$officeinstall = “0”
? “You will not have office installed at present”
EndSelect

Now basically that opening gun fire is how we are going to determine who will recieve Office via what Active Directory Group they are members of, and being a member of a certain group will mean the $officeinstall variable will have a different value which will have an impact on the installation later on. You will also have noticed that since we discussed deploying out the office files in advance that something else has been added.

A business requirement that became known at the last moment was that certain users need to have Office 2007 Professional edition installed instead of the normal standard version that we were going to install. So the extra group was implemented to take account of that, and again the $officeinstall variable will have a different value which means we can do different things for those lucky professional people.

Don’t forget, we don’t want everyone to get it and therefore for those few who would not recieve Office, we need to make sure that they get nothing. Hence the Case 1 part which means if none of the above conditions are met, the $officeinstall has a value of 0 to indicate nothing should happen.

NEXT!

? “*********** Copying Office 2007 Install Files *************”
;Added as part of Office 2007 Rollout taking place Jan 2009

if $officeinstall = “1”
 If not exist (“C:\Windows\OfficeTrack\officecopied.txt”)
 Shell ‘”
\\server\Office2007$\setup.exe” /config “\\server\Office2007$\configs\liscache.xml”‘
  if @error = 0
  ? “Office Preparation complete”
   if not exist (“C:\Windows\OfficeTrack”)
   md “C:\Windows\OfficeTrack”
   endif
  Copy “
\\server\office2007$\officecopied.txt” “C:\Windows\OfficeTrack”
  endif
 Else
 ? “Office 2007 Files have already been copied to your workstation”
 endif
endif

if $officeinstall = “2”
 If not exist (“C:\Windows\OfficeTrack\officeprocopied.txt”)
 Shell ‘”
\\server\Office2007Pro$\setup.exe” /config “\\server\Office2007Pro$\configs\liscache.xml”‘
  if @error = 0
  ? “Office Preparation complete”
   if not exist (“C:\Windows\OfficeTrack”)
   md “C:\Windows\OfficeTrack”
   endif
  Copy “
\\server\office2007Pro$\officeprocopied.txt” “C:\Windows\OfficeTrack”
  endif
 Else
 ? “Office 2007 Pro Files have already been copied to your workstation”
 endif
endif

Now we begin to see where the variable values come into play with the different versions of Office as they will determine what parts of the script execute for users. It may not be easy to read within the blog posts so when we reach the end of the scripting, a txt file containing the complete script will be included for you to look at.

Here we are repeating in essense, the deployment of the office install files to the MSOcache folder located on the local system drives which is something we had to consider as we are deploying across a WAN to two different locations. But this time, we are taking account of having a professional install needing to be deployed, so we have a new network location with the files we require, the service has been placed in the Updates folder and the xml file has been altered in the same way as before.

Also to track all this, we are still using text files to copy into a location where we will be looking to see what’s completed and what hasn’t, though as stated as before you could alter an area of the registry.

That’s it for Part 1 of the main script, stay tuned for Part 2 where we actually install Office, along with some add-ins, then afterwards we go off on one to take a look at Visual Studio 2008. But what does that have to do with our issue of Office 2007 being deployed? Wait and see… 

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

hi, great script you got up there. I tried and worked just fine. I will try to customize the code and apply some ajax on it.

thanks a lot.

Cancel

-ADS BY GOOGLE

SearchCIO

SearchSecurity

SearchNetworking

SearchDataCenter

SearchDataManagement

Close