The Microsoft Office 2007 Office System is using a new wrapper/bootstrap system to install the various Office MSI's. The primary bootstrap file is named, reasonably enough, setup.exe. This setup file uses separate xml files for each product as install-configuration files (setup.xml, config.xml).
Setup.exe also has several switches that can be used to perform several useful tasks, following are the switches I have found to be the most useful:
/admin - launches the Office Customization Tool, this tool will allow you to create an MSP to modify the install
/adminfile – this will allow you to use the MSP created above
/config – allows you to point to a Config.xml in a location other than
the default location
/uninstall - this switch gave me the most problems
My Experience
Recently, at work, I was asked to build a deployment for Microsoft Project 2007. I have re-packaged and built deployments for several versions of Office and for many Microsoft products and I knew that sometimes it is easy and sometimes not so easy.
Working on this deployment turned out to be easy, once I got past an unusual issue, and once I figured out how to correctly run the install and uninstall (not to mention the repair).
The issue occurred pretty quickly when I ran the install. I got the following error:
When I clicked "Close" this dialog popped up:
I clicked “What data does this error report contain?” and got this message:
Then I clicked “View the contents of the error report” to get the name of the log file. From there I copied the path to the log file, pasted it into the run dialog and clicked ok opening the log file (which is mostly just several MSI log files and the setup.exe’s log all together). As always when troubleshooting a MSI install I searched for ‘value 3’. I found two instances of “return value 3” but little in the way of useful information.
So I opened the event viewer and in the application log looked for events with MsiInstaller or “Microsoft Office 12” as the Source. And there I found one of each type of the events I was looking for that were related to this issue. The "Microsoft Office 12" event was mostly useless, but I hit the jackpot with the MsiInstaller event:
Event Type: Error
Event Source: MsiInstaller
Event Category: None
Event ID: 11933
Date: 11/15/2007
Time: 12:55:19 PM
User: USERNAME
Computer: COMPUTERNAME
Description:
Product: Microsoft Software Update for Web Folders (English) 12 -- Error 1933. The Windows Installer service cannot update one or more protected Windows files. SFP Error: 21. List of protected files:\r\nc:\program files\common files\microsoft shared\web server extensions\40\bin\fp4autl.dll
Event Source: MsiInstaller
Event Category: None
Event ID: 11933
Date: 11/15/2007
Time: 12:55:19 PM
User: USERNAME
Computer: COMPUTERNAME
Description:
Product: Microsoft Software Update for Web Folders (English) 12 -- Error 1933. The Windows Installer service cannot update one or more protected Windows files. SFP Error: 21. List of protected files:\r\nc:\program files\common files\microsoft shared\web server extensions\40\bin\fp4autl.dll
As you can see there is a reference to the file fp4autl.dll. A quick browse through the Microsoft Dll Database (EDIT: As per their website "The DLL Help application was retired on February 8, 2010 and is no longer accessible." Microsoft has discontinued one if it's best online tools. I hope there is some kind of replacement available. ) showed that this file should have been in place, since I am testing on Windows XP SP2.
I checked on several of my systems for the file to no avail, but finally found a copy of the file on the system I use for email and web access. So I copied the file to the system I was testing on (here: C:\Program Files\Common Files\Microsoft Shared\web server
extensions\40\bin\fp4autl.dll). Just to be on the safe side I also tested with regsvr32 to see if it needed to be self registered which it did not.
So I tested the install and it worked!
Now that I knew that I could get it to install I wanted to create an MSP to automate the install process.
I ran “Setup.exe /Admin”, which brought up the Office Customization Tool and this popup:
I left it at the default since I needed to create a new MSP and clicked ok. There were a number of options but what I needed was:
- Install location and organization name
- This allowed me to set the Organization name
- Licensing and user interface
- This allowed me to put in the product key, to accept the License Agreement, and set the display level to Basic.
- Add registry entries
- In order to suppress an initial popup I set the following values:
- HKLM\SOFTWARE\Microsoft\Office\12.0\User Settings\ShownOptIn\
- Count=1 (REG_DWORD)
- Order=1 (REG_DWORD)
- HKLM\SOFTWARE\Microsoft\Office\12.0\User Settings\ShownOptIn\Create\Software\Microsoft\Office\12.0\Common\General\
- ShownOptIn=1 (REG_DWORD)
- ShownOptInFix=Applied (REG_SZ)
Once I was finished with that I saved the changes and named the new file Project_Pro_CompanyName.MSP.
Now that I had an MSP that could be used to automate my install. I used the following command line to test the install and it ran smoothly:
setup.exe /adminfile Project_Pro_CompanyName.MSP
But I ran into another issue when I tried to test the uninstall of Microsoft Project 2007. I first tried using the following string:
setup.exe /Uninstall {90120000-003A-0000-0000-0000000FF1CE}
But that would generate this error:
'This product installation has been corrupted. Run setup again from the CD, DVD, or other original installation source.'
I was able to uninstall from Add/Remove programs, but I needed to be able to automate the process.
So I took a look in the registry. Very often there is an uninstall string that gives the command line needed to remove an installation. The first location I looked in was: [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90120000-003A-0000-0000-0000000FF1CE}]
Name: "UninstallString"
Type: REG_EXPAND_SZ
Data: MsiExec.exe /X{90120000-003A-0000-0000-0000000FF1CE}
So I tried running "MsiExec.exe /X{90120000-003A-0000-0000-0000000FF1CE}" and it worked, but it seemed to me that there should be some way to use the setup.exe, it has the /uninstall switch so it should work somehow.
It took a long time to figure out the correct string:
"C:\Program Files\Common Files\Microsoft Shared\OFFICE12\Office Setup Controller\SETUP.EXE" /uninstall PRJPRO /dll OSETUP.DLL
I found it in this registry key:
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\prjpro]
Apparently the first key I looked under was just for the one MSI installing the core Project files, but the second registry key I looked at was for the entire Project setup.
Using that string worked but it brought up a dialog requiring user interaction and at the end it rebooted. Neither of these events was desirable.
So after a little more digging and experimenting I figured out that I needed to modify a copy of the config.xml to suppress the dialog and the reboot, and I needed to point to the alternate config.xml, which I placed in the temp directory. I modified the following lines in the xml file, first removing the remark characters “ <!-- -->” then changing the values to match what I needed:
<Display Level="None" CompletionNotice="no" SuppressModal="no" AcceptEula="no" />
<Setting Id="SETUP_REBOOT" Value="Never" />
And the command line that I ended up using was:
"C:\Program Files\Common Files\Microsoft Shared\OFFICE12\Office Setup Controller\setup.exe" /config %temp%\config.xml /uninstall PRJPRO /dll OSETUP.DLL
At this point I thought that I was done, then I realized that I needed to provide for repairing, luckily that was pretty simple:
“C:\Program Files\Common Files\Microsoft Shared\OFFICE12\Office Setup Controller\setup.exe” /repair PRJPRO
And finally I was finished. The deployment tool we use is able to install, repair and uninstall the package all automatically.
1 comment:
Excelent it works charm for me ..I have looked the solution in microsoft and google i couldnt find the exact solution to uninstall
Appreciate your work around on this .
Post a Comment