I am trying to uninstall 24 different versions of ITunes from my domain using a scripts on Windows XP machines. The only way that I know how to do this is find the key in the registry for each version and then run msiexec.exe /x {key from registry} /qn on each machine with the particular version installed.

I have two questions.
1) Does anyone know what command Windows is using when you run the uninstall from Add/Remove programs?
2) Is there an easier way to do the uninstall other than the way I have discribed?
Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Check here:
Answered 01/30/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
I think a script is the way to go here.

There's a neat registry class available (IIRC, http://www.jsware.net) but don't quote me) called cRegistry which wraps up the WMI registry provider really nicely. One of the functions it provides enumerates a registry key and another enumerates a key and all its values. Thus you could start at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and get all the product codes (they get put into an array). Then you would loop through that array and search for the product code you're interested in (obviously, this is all inside another loop, going through your list of 24 product codes to be removed). Once you find the code, you can either get all the values for the key (to perhaps make sure the display name includes 'iTunes' or something like that) or simply execute MSIExec against that code.
Answered 02/02/2009 by: VBScab
Red Belt

Please log in to comment
Yes. Perhaps the next question is "what deployment tool do you use?" A lot of tools already have this functionality built-in.
Answered 02/02/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment