/build/static/layout/Breadcrumb_cap_w.png

KACE K1000 Script to uninstall all versions of iTunes

I discovered that the K1000 msi configuration policy uninstaller fails to work for iTunes version 12 (it worked for 11, why it no longer works, I don't know).
When I ran the script created by the policy, it ran successfully (so it said), but inventory showed iTunes still installed. Bummer.
So I turned to the old standby, VBScript to uninstall it.
Here it is if anyone needs it:
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set WshShell = CreateObject("wscript.Shell")

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")
If strDisplayName = "iTunes" Then
WshShell.Run "msiexec.exe /X " & SubKey & " /qn", 7, True
End If
Next


Comments

This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ