ZThurlow Posted November 27, 2017 Share Posted November 27, 2017 Hello, we have about 60+ machines that we need to uninstall some software on (WebEx Productivity Tools). I need to run the the command: msiexec.exe /q /x "ptools.msi". The problem for me is, this command requires that I run it from the directory that has the MSI installer to work which is on a network folder. I also need to run this command with a network administrator account as all the PC's are on an active directory domain. I am limited in my skills with autoit and have tried every variation of my script that I could find and simply cannot get it to work. Please help?! Link to comment Share on other sites More sharing options...
Earthshine Posted November 27, 2017 Share Posted November 27, 2017 (edited) Add a complete path before the MSI file. It should be the path where that MSI lives on the network post your Code too Edited November 27, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ZThurlow Posted November 28, 2017 Author Share Posted November 28, 2017 (edited) Thanks for the response! Here is the latest variation of code (I have tried several different variations and this was the closest I got). I also would like to include a check for the program before I continued with the uninstall, but I am also still working on the If statements: Global $sUserName = "zthurlow" Global $sPassword = "password" Global $sNetwork = "network" ;checking for WebEx Productivity Tools ;If Not fileExists("C:\Program Files (x86)\WebEx\Productivity Tools\CiscoWebExStart.exe") Then Exit If ;EndIf RunAs($sUserName, $sNetwork, $sPassword, 4, "msiexec /q /x \\lenovo-t440\acromag$\WebExRemoval\ptools.msi") Edited November 29, 2017 by ZThurlow Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) use the code tags please. ok, there is a registry key with the uninstall information. are you not using that string? because I don't think you need the actual msi, at least none that I ever authored worked like that. To Check if the Program is installed, look in the following pair of registry keys 64bit windows applications go here: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall 32bit windows applications here: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall So if ptools.msi is x86, then look under the 32bit key on a 64 bit windows. First, look manually for it. Just look until you find ptools.msi registry key with all it's associated data look for ptools custom uninstall string and try that, all local There is a Registry UDF around here you can use to easily search registry. Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) a custom uninstall string can look something like this for example MsiExec.exe /X{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4} Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ZThurlow Posted November 28, 2017 Author Share Posted November 28, 2017 (edited) How do I copy the code tags? I did find the uninstall string in reg. I modified script and here is what I have: Global $sUserName = "zthurlow" Global $sPassword = "password" Global $sNetwork = "network" RunAs($sUserName, $sNetwork, $sPassword, 4, "MsiExec.exe /i{5B51E040-91DA-11E7-A3C5-54EE755D74E2}") Only problem I found is it launches the GUI for uninstall. I need to add /q and /x for a quiet uninstall, but anytime I do I get the MSI pop-up box stating I didn't enter the parameters correctly. Thanks for your help! Edited November 29, 2017 by ZThurlow Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) here is a little something to help you search, the code uses 'ptools.msi' as the search string log4a.au3 RegSearch.au3 WhatIsInstalled.au3 run this on one of your client machines to see where it lives. use RegRead to get it's UninstallString value and Run That. I hope the problem is solved after that. Edited November 28, 2017 by Earthshine fixed My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ZThurlow Posted November 28, 2017 Author Share Posted November 28, 2017 (edited) This code (below) launches the uninstaller, but I just need it to be a quiet uninstall: Global $sUserName = "zthurlow" Global $sPassword = "password" Global $sNetwork = "network" RunAs($sUserName, $sNetwork, $sPassword, 4, "MsiExec.exe /x {5B51E040-91DA-11E7-A3C5-54EE755D74E2}") Edited November 29, 2017 by ZThurlow Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) hang on, lemme dig into one of my installers.. lol try to use the <> Code tags for code mate. try this Global $sUserName = "zthurlow" Global $sPassword = "Brighton1" Global $sNetwork = "taznetworks" RunAs($sUserName, $sNetwork, $sPassword, 4, "MsiExec.exe /qb /x {5B51E040-91DA-11E7-A3C5-54EE755D74E2}") Proper syntax is msiexec.exe /qb /x product_code You can buy me a cup of coffee and we will call it even.... lol, joking. hope this helps you out. I gave you the search code too up there btw. Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 28, 2017 Moderators Share Posted November 28, 2017 If you do an msiexec /? in the run line it will show you proper syntax: msiexec <install option> <product.msi> <display option> So msiexec /x <product> /qn for silent Earthshine 1 "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! Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) //--------------------------------------------------------------------------- // function UninstStackCfg() //--------------------------------------------------------------------------- function UninstStackCfg() STRING szCmdLine; NUMBER nResult; begin nResult = DecrementSharedComponentCount(HKEY_LOCAL_MACHINE, REG_SHARED_APPLICATION, SD_STK_CFG); if (nResult > 0) then return(-1); else szCmdLine = DetectSetupExists(REG_STACK_CFG); //MessageBox(szCmdLine, INFORMATION); if (StrLength(szCmdLine)>0) then SdShowMsg("Uninstalling Stack Configuration Utility", TRUE); szCmdLine = "Msiexec /X{" + REG_STACK_CFG + "} /qb"; nResult = LaunchAppAndWait("", szCmdLine, LAAW_OPTION_WAIT); SdShowMsg("Uninstalling Stack Configuration Utility", FALSE); endif; endif; end; yes! that's it. it's the szCmdLine I call to uninstall so JLogan3o13, is correct I was wrong. The above code is some InstallScript to uninstall one of our apps if it's not being used by any other of our application suites Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ZThurlow Posted November 28, 2017 Author Share Posted November 28, 2017 (edited) Here is what I tried, however, it's not uninstalling...nothing happens: Global $sUserName = "zthurlow" Global $sPassword = "password" Global $sNetwork = "network" RunAs($sUserName, $sNetwork, $sPassword, 4, "MsiExec.exe /x {5B51E040-91DA-11E7-A3C5-54EE755D74E2} /qn") When I try using "msiexec.exe /x /qn <product>" it launches the uninstall process, but needs me to click yes to a few prompts, which I can't do. This needs to be run through a GPO with no user prompts in the background. When I run "MsiExec.exe /x {5B51E040-91DA-11E7-A3C5-54EE755D74E2}" from an elevated command prompt, it does run perfectly with no prompts. I think we are close! Edited November 29, 2017 by ZThurlow Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 28, 2017 Moderators Share Posted November 28, 2017 Stick the /qn at the end, after the product id "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! Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) It’s /qb at the end. Not /qn. I use /qb in my stuff apparently Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 28, 2017 Moderators Share Posted November 28, 2017 (edited) /qn is silent, /qb shows a progress bar (basic UI). Typically you would want a completely silent uninstall so as not to prompt helpdesk calls from users seeing even a progress bar. Edited November 28, 2017 by JLogan3o13 "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! Link to comment Share on other sites More sharing options...
ZThurlow Posted November 28, 2017 Author Share Posted November 28, 2017 (edited) Ran this (below), does not uninstall. Confirmed my login credentials are exactly right for domain admin account: Global $sUserName = "zthurlow" Global $sPassword = "password" Global $sNetwork = "network" RunAs($sUserName, $sNetwork, $sPassword, 4, "MsiExec.exe /X {5B51E040-91DA-11E7-A3C5-54EE755D74E2} /qn") Edited November 29, 2017 by ZThurlow Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) So what did it do you can you provide screenshots. I would try /qb Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
ZThurlow Posted November 28, 2017 Author Share Posted November 28, 2017 Here's a screenshot. Appears to run normally, but application is never uninstalled, nothing pops up. Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) OK sounds like you have some troubleshooting to do. Try this. First, uninstall it from the control panel and walk through it and see if there something that stopping it from uninstalling It would be really cool if you know knew how to find it’s log file Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Developers Jos Posted November 28, 2017 Developers Share Posted November 28, 2017 have you tried with @RequireAdmin at the top of the script? Jos Earthshine 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
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