Automating Office 2007 installation\ Deploying InfoPath 2007 Programmability support (Part 1)
Posted
Friday, December 07, 2007 8:36 PM
by
Itay Shakury
This Post is about How to create a file that will add specific features to an Office 2007 installation, specifically the .NET Programmability support for InfoPath.
If you want to run InfoPath forms that include managed code (C# or VB) you have to make sure that "InfoPath Programmability support for .NET framework 2.0" is installed. It appears under InfoPath when you select to change the installation of Microsoft Office in the Add\Remove wizard. This feature is not installed with the Typical installation of Office, and you have to manually install it.
Last week I have been to a client, with couple of hundreds of computers, all of them already has InfoPath 2007 installed, but none of them had the Programmability support feature installed. So I needed a way to deploy this (and only this!) feature to a lot of computers, in an automated way.
This can be done using OCT, or Office Customization Tool, That comes with every Office installation. This tool allows you to create a customized installation of Office in merely seconds. You can open it with the "\admin" switch of the setup.exe file of Office.
- Open Start --> Run and type the following, replace the path to wherever your installation is:
"c:\Office2007Install\setup.exe /admin"
- The OCT wizard opens.
- Click OK to create a new setup file.
- Select "Set feature installation states" from the side menu.
- Expand the Microsoft InfoPath 2007" node, and click on the icon next to ".NET Programmability Support".
- Select "Run from this computer" (just like you would with a normal installation).
- This action added an [F] tag to tell us that this setting will be Forced.
It also marked every child node as Forced. For me this is unwanted situation, because VSTA is a child node and we don't want it to be installed on every computer in the organization. So we will exclude VSTA from being Forced (If a user already had VSTA installed it will remain intact, If not it will not be installed).
- Expand the ".NET Programmability Support" node until you reach the node "Visual Studio Tools for Applications".
- Click the icon next to it and select "Reset". This will remove the [F] tag meaning you are not changing the state of this.
- Save the file (File --> Save)
What you have just created, is an .msp (Microsoft Patch) file that adds the Programmability support feature to your existing InfoPath installation. You can try it out by doubly clicking on it.
- Next steps depends on you preferences. We used GPO to deploy this file as a startup script, but you can use MOM, GPO installations, WSUS, or any other deployment platform to do this.
- Using this tool you can customize practically every aspect of an Office 2007 installation. Play with the tool a bit and use it for other purposes as well.
- Check out Part 2 (coming soon) for another tip regarding the installation process of this file.