ricky918 Posted December 11, 2012 Posted December 11, 2012 ]Can anyone point me in the right direction??? I need to build a script that will run the uninstaller for superantispyware with a silent switch I have the free version of the program installed on about 400 systems and I need to remove it. this is what I have come up with so far. Run("C:\Program Files\SUPERAntiSpyware\Uninstall.exe") WinWaitActive("SUPERAntiSpyware Uninstaller", "OK") Send("{ENTER}") WinWaitActive("SUPERAntiSpyware Uninstaller", "SUPERAntiSpyware Uninstall must reboot your computer now","OK") Send("{ENTER}") Any help would be greatly appreciated
JohnOne Posted December 11, 2012 Posted December 11, 2012 A super anti spyware product has a silent uninstall switch? Genius. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
ricky918 Posted December 11, 2012 Author Posted December 11, 2012 no it does not have one, that is why I am trying to build a script that will uninstall it
JohnOne Posted December 11, 2012 Posted December 11, 2012 I see, what is wrong with the code you have? details are important. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Chimaera Posted December 12, 2012 Posted December 12, 2012 (edited) I came across this which is not from autoit but look at the remove section at the bottom <package id="superantispyware" name="Super Anti-Spyware" revision="1" reboot="false" priority="1"> <check type="uninstall" condition="exists" path="SUPERAntiSpyware Free Edition" /> <install cmd='%COMSPEC% /c msiexec /i %SOFTWARE%SUPERAntiSpyware.msi /qn /norestart' /> <install cmd='"%SOFTWARE%SASDEFINITIONS.EXE" /s' /> <install cmd='%COMSPEC% /c mkdir "%AllUsersProfile%Start MenuProgramsSuper Anti-Spyware"' /> <install cmd='%COMSPEC% /c copy "%UserProfile%Start MenuProgramsSUPERAntiSpyware*.*" "%AllUsersProfile%Start MenuProgramsSuper Anti-Spyware"' /> <install cmd='%COMSPEC% /c rmdir /q /s "%UserProfile%Start MenuProgramsSUPERAntiSpyware"' /> <install cmd='%COMSPEC% /c del /q "%UserProfile%DesktopSUPERAntiSpyware Free Edition.lnk"' /> <upgrade cmd='"%SOFTWARE%SASDEFINITIONS.EXE" /s' /> <upgrade cmd='%COMSPEC% /c rmdir /q /s "%UserProfile%Start MenuProgramsSUPERAntiSpyware"' /> <remove cmd='%COMSPEC% /c msiexec /x %SOFTWARE%SUPERAntiSpyware.msi /qn' /> <remove cmd='%COMSPEC% /c rmdir /q /s "%AllUsersProfile%Start MenuProgramsSuper Anti-Spyware"' /> </package>Now if it is an .msi it will probably support the switch /qn Edited December 12, 2012 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
Scriptonize Posted December 12, 2012 Posted December 12, 2012 (edited) That's a command line switch for msiexec, the Microsoft Installer app.Take a look here for explanation."/qn" sets the u(ser) i(nterface) level during an installation to "no ui" Edited December 12, 2012 by Scriptonize If you learn from It, it's not a mistake
Chimaera Posted December 12, 2012 Posted December 12, 2012 (edited) Actually if you look its an uninstaller switch as well, my point was does the msi still exist in the install folder if so you could call it that way.To remove or uninstall a package, type:msiexec /x Example.msihttp://technet.microsoft.com/en-us/library/cc759262%28v=ws.10%29.aspx#BKMK_Uninstall Edited December 12, 2012 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
BrewManNH Posted December 12, 2012 Posted December 12, 2012 The "/x" in the string uninstalls the program. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Moderators JLogan3o13 Posted December 12, 2012 Moderators Posted December 12, 2012 Actually if you look its an uninstaller switch as well, my point was does the msi still exist in the install folder if so you could call it that way.To remove or uninstall a package, type:msiexec /x Example.msihttp://technet.microsoft.com/en-us/library/cc759262%28v=ws.10%29.aspx#BKMK_UninstallI would always suggest trying the command line, whether you see the MSI or not. When installing via msiexec, the MSI is rarely saved to the installation directory. Most often it is saved in one of several Windows directories (System32, Downloaded Installations, Advanced Installations, Downloaded Program Files, etc.) depending on the type of application and the OS, and often in a hex folder format. The system knows where to find the cached MSI for repair/uninstall operations.I always suggest looking in the registry first - if the product exists under HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall in a hex format ({xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}), there is a good chance the MSI is cached locally somewhere on the PC. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
ricky918 Posted December 12, 2012 Author Posted December 12, 2012 (edited) JohnOne, the script seems to run find on a local machine ( except for Vipre anti-virus) But when I try to run it on a remote machine I just get a messagebox flash and then nothing Chimaera, That would be great if I could get my hands on a .MSI file for SuperAntiSpyware. I have searched on the machines and on the net. I can't seem to find a MSI file for it anywhere. it has a sasuninstall.exe but I can't get any switches to work with it. Edited December 12, 2012 by ricky918
BrewManNH Posted December 12, 2012 Posted December 12, 2012 How are you atttempting to uninstall it remotely? Is it even possible to do that? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
ricky918 Posted December 12, 2012 Author Posted December 12, 2012 Yes that is what I am trying to do, But I would like to do it silently as so not to need user intervention
BrewManNH Posted December 12, 2012 Posted December 12, 2012 You missed the most important question, how are you attempting to do it? Where's the script you're using to uninstall it remotely? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
ricky918 Posted December 12, 2012 Author Posted December 12, 2012 Run("C:Program FilesSUPERAntiSpywareUninstall.exe") WinWaitActive("SUPERAntiSpyware Uninstaller", "OK") Send("{ENTER}") WinWaitActive("SUPERAntiSpyware Uninstaller", "SUPERAntiSpyware Uninstall must reboot your computer now","OK") Send("{ENTER}")
BrewManNH Posted December 12, 2012 Posted December 12, 2012 That's not a remote script, that's running it locally. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Moderators JLogan3o13 Posted December 12, 2012 Moderators Posted December 12, 2012 I can confirm after downloading this application that it is not an MSI install, and doesn't support switches on the executable (for the free version, anyway). The closest I have come to after looking the product up online is the SuperAntiSpyware Uninstaller Assistant (who names this crap?!). You get one pop-up box, but should be able to make it go away almost before the user sees it. You will still have to decide how you're going to kick off the uninstall remotely, as BrewManNH has twice tried to point out to you.Once you have the assistant downloaded, I would personally do something like this:FileInstall("C:SASUNINST.exe", @TempDir & "SASUNINST.exe") Run(@TempDir & "SASUNINST.exe") WinWaitActive("SUPERAntiSpyware", "This will uninstall SUPERAntiSpyware") ControlClick("SUPERAntiSpyware", "This will uninstall SUPERAntiSpyware", 6) WinWaitActive("SUPERAntiSpyware", "SUPERAntiSpyware Uninstall must reboot your computer now") ControlClick("SUPERAntiSpyware", "SUPERAntiSpyware Uninstall must reboot your computer now", 2)Be aware if you are in any sort of enterprise environment, this application does not uninstall cleanly; you'll have plenty to clean in the way of leftover files and registry entries, even after the reboot. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
ricky918 Posted December 17, 2012 Author Posted December 17, 2012 OK I really appriciate all the help y'all put to help me. I figured out how to do it, But I never got the script to work properly. What I did was I found a command command line uninstaller on the web. It is real small and allows me to use the normal command line switches on the program. So that is what I done. Again thank y'all very much for your help
adam_e42 Posted February 14, 2017 Posted February 14, 2017 I was trying to do this as well, and could not get mouseclick or controlclick to work on the buttons. I had a eureka moment and made sure to run as admin, and everything began to work.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now