/build/static/layout/Breadcrumb_cap_w.png

Uninstall Spybot Unattended

Hello,

I am creating a package to uninstall Spybot unattended. I have several versions of spybot to remove off machines. When i run the script i get the Windows Installer pop up. Any help would be greatly appreciated.
This is my script.
Christa

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 = "Spybot - Search & Destroy" Then
WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True
End If
If strDisplayName = "Spybot - Search & Destroy 1.2" Then
WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True
End If
If strDisplayName = "Spybot - Search & Destroy 1.3" Then
WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True
End If
If strDisplayName = "Spybot - Search & Destroy 1.4" Then
WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True
End If
If strDisplayName = "Spybot - Search & Destroy 1.5.2.20" Then
WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True
End If
If strDisplayName = "Spybot - Search & Destroy 1.6.2" Then
WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True
End If
Next

0 Comments   [ + ] Show comments

Answers (8)

Posted by: anonymous_9363 15 years ago
Red Belt
0
When i run the script i get the Windows Installer pop up. What "Windows Installer pop up"?
Posted by: clyrigham 15 years ago
Orange Belt
0
Hey Christa...

You are getting the subkey name directly, maybe you need to take the UninstallString into this subkey... Perhaps the UninstallString is set to call a different productkey than the subkey or call a .exe to uninstall the package!
Posted by: anonymous_9363 15 years ago
Red Belt
0
You are getting the subkey name directly, maybe you need to take the UninstallString into this subkey... Perhaps the UninstallString is set to call a different productkey than the subkey or call a .exe to uninstall the package!The EXE note is a good call but, for MSIs, I defy you to find a sub-key whose name was not in the uninstall string: a ProductCode is a ProductCode is a ProductCode.
Posted by: clyrigham 15 years ago
Orange Belt
0
Ok, did you not get a package made/digged by another person who made a s**t in that? So, I did... to your surprise the productcode was different and it uninstalled 2 applications in one time!

Otherthing: this is a forum to help other people, not to show who knows more than another Sir.


-- No cursing please -Bob
Posted by: anonymous_9363 15 years ago
Red Belt
0
First, let me deal with the ProductCode. Please explain how - exactly - the Windows Installer engine uninstalled the product with the incorrect ProductCode. The packed GUID which is used to match features and components to that product would not match up so nothing would get uninstalled. Indeed, I'd expect the engine to present the message "This action is only valid for installed products." when the uninstall was attempted.

Second, whilst I am generally scathing about vendor packages, I rather fancy that, given the above i.e. a product which can't be uninstalled, a vendor would hastily release a package with no such error. If you're talking about internal packages, well, the author hopefully wouldn't last long enough to release more than one such package.

Lastly, let me deal with your attitude. No, on second thoughts, I don't think I'll bother.
Posted by: clyrigham 15 years ago
Orange Belt
0
Thanks for the explanation dude. But really I already knew about it

I know that package I mentioned in my last package was great error from the vendor (sorry if I do not remember what is the package, I think it was a internal software from a small company I worked, and I was responsable to replace that guy...)

When I wrote about the productcode may be different from the uninstallstring is because I lived this experience, sorry if I was stupid with you, but I was thinking your attitude to defy me was unnecessary. Sometimes in this forum I feel the members aren't friends to collaborate with others...

Stay in peace my friend!

Kind Regards,
Posted by: christa.little 15 years ago
Yellow Belt
0
Windows Installer V4.5.6001.22159
Posted by: anonymous_9363 15 years ago
Red Belt
0
I get it, I get it....you get no installation, but a screen displaying the various arguments that you need to pass to MSIExec.EXE, right?

It's because you have an error of some kind in the command line. MSIExec can't interpret the whole line and thus abandons the whole exercise.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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