ITunes Uninstall
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?
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?
0 Comments
[ + ] Show comments
Answers (3)
Answer Summary:
Please log in to answer
Posted by:
turbokitty
15 years ago
Posted by:
anonymous_9363
15 years ago
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.
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.
Posted by:
turbokitty
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.