Cliff Saran’s Enterprise blog

Feb 4 2009   1:48PM GMT

Office 2007 Deployment: The Main Script Part 3

phughes2 Profile: phughes2

Tags:
Add-ins
Office 2007

And so after leaving Visual Studio behind for the moment we return to the code within the KIX logon script for the office deployment, now this entry is fairly simple as it just involves adding extra parts to Office, the “Save as XPS or PDF” addin and the Office 2003 Web components which were required by ourselves to support applications reliant on that.

;************ Install Office 2003 Web Components Add-in for Office 2007 ******************

If $officepresent = “1” and $officeinstall <> “0” And Not Exist (“C:WindowsOfficeTrackWeb.txt”)
? “Installing Office 2003 Web Components Add-in for Office 2007”
Shell “\serveroffice2007$Webowc11.exe
/quiet”
if @error = 0
Copy
\serveroffice2007$WebWeb.txt “C:WindowsOfficeTrack”
? “Setup of Web Components Add-in complete”
$WebPresent = “1”
endif
else
? “Office 2003 Web Components add-in install bypassed”
EndIf

If exist (“C:WindowsOfficeTrackWeb.txt”)
$WebPresent = “1”
else
$WebPresent = “0”
endif

Here we see more variables coming into play as conditions to met again like before, and this time we are using the $officepresent variable from when the main Office install completed from Part 2 of the logon script explaination. We see that when the conditions are met for office being installed, that the user is meant to have office installed (the $officeinstall variable created earlier in Part 1) and the text file it looks for isn’t there, the script will siliently install the web components.

If all is good, the text file web.txt is written to the Officetrack folder and therefore the next time the user logs on and this section runs, it will bypass the install. We also are tracking to see if the text file is there for the components and populate a variable which will be used at the very end of the script.

;************ Install Save as XPS or PDF Add-in for Office 2007 ******************

If $officepresent = “1” and $officeinstall <> “0” And Not Exist (“C:WindowsOfficeTrackXPSPDF.txt”)
? “Installing Save as PDF and XPS Add-in”
Shell “
\serveroffice2007$XPSPDFSaveAsPDFandXPS.exe /quiet”
if @error = 0
Copy “
\serveroffice2007$XPSPDFXPSPDF.txt” “C:WindowsOfficeTrack”
? “Setup of XPS/PDF Add-in complete”
$XPSPDFPresent = “1”
endif
else
? “Save as PDF and XPS add-in install bypassed”
EndIf

If exist (“C:WindowsOfficeTrackXPSPDF.txt”)
$XPSPDFPresent = “1”
else
$XPSPDFPresent = “0”
endif

And for the “Save as XPS or PDF” addin, it’s pretty much the same as the Office 2003 web components we just looked through, though you could actually avoid installing the add-in via  this method for this by including the install within the MSP file created using the Office Customisation Tool by adding the command line to the “Add installations and run programs” section as illistrated below:

 installviaMSPinstead.gifThis will be entirely up to yourselves as to what method you choose, however we didn’t include those programs within the MSP as we wanted a more clear view of what will be installed at each stage and we can see that with the text files that only copy across if the install completed successfully.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: