Link to home
Start Free TrialLog in
Avatar of rjccomps
rjccompsFlag for United States of America

asked on

Uninstall Excel 2007 from batch file

Currently we have Excel 2007 and the Office 2003 suite installed on a lot of pc's. We created a msp file to install the new office 2007 suite which will remove office 2003 and put all 2007. If excel 2007 is installed we get an error stating admin file can't be run when its not the intial installation. I tried modifying the msp, it just doesn't work. So what I am trying to do is make a batch file that can be run to uninstall excel 2007 before installing the office 2007 package.

Thanks for the help
Avatar of rjccomps
rjccomps
Flag of United States of America image

ASKER

Update:

Setup.exe /uninstall proplus

this works, but prompts for a yes or no on the uninstall.
Anyone know how to bypass this
ASKER CERTIFIED SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
correction:

1. Find out the GUID of the installation of Office 2003
I made an xml answer file. This worked out the best.
Please clarify what is xml answer file, and how you made it. If this is config.xml, exactly what option did you specify (the description of config.xml is at http://technet.microsoft.com/en-us/library/cc179195.aspx) . From what I know, you can specify there removing or not the previous version of Office, but not the current one, which was the question. So if you have found the way, please post, so it goes into the KB.

Also, since the question was how to make batch file, the answer should probably provide the specific command, involving the xml answer file if necessary.

Also, if you tried my suggestion and it did not work, please state that. If you did not try it, then the answer probably should be split.
I would have to agree with vadim, both his answer utilizing the product guid as well as my answer utilizing WMIC will remove the software once properly used.

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Moderator please split between vadimrapp1 xxdcmast and I. I didn't try their solutions, but they seem viable. Thanks
Thanks for the clarification. Not necessary really, but if you could spare 10 minutes, I'd appreciate if you could give little more details about the original problem, and the exact message " admin file can't be run when its not the initial installation" - was that the exact text?

The reason I'm asking is because in the previous versions of Office, it was fully possible to install, for example, Outlook as standalone product, then launch installation of full Office, and it would correctly detect that Outlook is already installed, and that would be reflected in the Custom Installation screen. Actually, this is how Installer is supposed to work if the installation is authored correctly - specifically, if Outlook feature and components are the same in both installations - the component is supposed to recognize that it's already installed by another installation. Or it was possible to install, for instance, Office Pro, and then also Office with Frontpage in order to have Frontpage as well. So it seems strange that in this case Office rejected its own feature because it was installed by another package.
When you use the command setup.exe /adminfile blahblah.msp. You are unable to install any additional office 2007 products if they are already installed. That's where thy error comes into play. By modifying that msp file and using msiexec /p newblahblah.msp , we can avoid that error message but office 2007 then leaves office 2003. This is where the config file comes in to assist in an unattentended uninstall that we can push as a package to our users. After this completes we can once again use setup.exe /adminfile blahblah.msp to install all of the selected products