I'm trying to automate the uninstallation of packages created using WiX for the purposes of changing the installed software stack & configuration without reprovisioning a whole OS. Eventually I'll use powershell scripting to do this but at the moment I can't seem to get my test package to uninstall interactively with cmd.
I've looked at the windows installer guide, the WiX documentation, msiexec documentation and used orca to go over the .msi myself but I've not really found anything that gives a clear picture of how an uninstall is processed. Is the .msi file required and if not then why does windows installer seem to think it is when given a GUID?
"Reference-Style" Answer: This is an alternative answer to the one below with several different options shown. Uninstalling an MSI file from the command line without using msiexec.
If you get "This action is only valid for products that are currently installed" you have used an unrecognized product or package code, and you must find the right one. Often this can be caused by using an erroneous package code instead of a product code to uninstall - a package code changes with every rebuild of an MSI file, and is the only guid you see when you view an msi file's property page. It should work for uninstall, provided you use the right one. No room for error. If you want to find the product code instead, you need to open the MSI. The product code is found in the Property table.
With all the registry redirects going on, I am not sure the below registry-based approach is a viable option anymore. I haven't checked properly because I now rely on the following approach using PowerShell: How can I find the product GUID of an installed MSI setup?
Also check this reference-style answer describing different ways to uninstall an MSI package and ways to determine what product version you have installed:Uninstalling an MSI file from the command line without using msiexec
The good thing is, this one is really easily and deterministically to analyze:Either, the msi package is really not installed on the system or you're doing something wrong.Of course the correct call is:
(Admin rights needed of course- With curly braces without any quotes here- quotes are only needed, if paths or values with blank are specified in the commandline.)
If the message is: "This action is only valid for products that are currently installed", then this is true. Either the package with this ProductCode is not installed or there is a typo.
First try to right click on the (probably) installed .msi file itself. You will see (besides "Install" and "Repair") an Uninstall entry. Click on that.
a) If that uninstall works, your msi has another ProductCode than you expect (maybe you have the wrong WiX source or your build has dynamic logging where the ProductCode changes).
b) If that uninstall gives the same "...only valid for products already installed" the package is not installed (which is obviously a precondition to be able to uninstall it).
If 1.a) was the case, you can look for the correct ProductCode of your package, if you open your msi file with Orca, Insted or another editor/tool. Just google for them. Look there in the table with the name "Property" and search for the string "ProductCode" in the first column. In the second column there is the correct value.
Just a suggestion for the used commandline: I would add at least the "/qb" for a simple progress bar or "/qn" parameter (the latter for complete silent uninstall, but makes only sense if you are sure it works).
The original install is in fact visible in the current context. It looks as if it might have been a per-user install, and if you are logged in as somebody else now then it won't know about it - you'd need to log in under the same account as the original install.
I use Revo and Glary Utilities uninstallers before I roll up my sleeves and have to think about .msi. Then work it with the steps above. No go? Stubborn bytes are getting evicted. Backup registry, run Nirsoft registry scanner and save findings to use later. Backup all system dll's, deltree -f (sic.) the folders, reboot, test, decide to disembowel its registry or save the fun for later. Or never.
In conclusion... This was a total bait and switch. The product is no longer what it was promised to be at purchase. You have opened yourself up to a lawsuit. Not just for the product but for all the labor involved in setup, discovery and use of your product prior to switching to a different product. It would be deeply appreciated if you would put that feature back the way it was. If you have people that need a temporary file transfer area.. Create a NEW feature FOR THEM. Or a switch. (:
Thank you so much!
Hi Merlin, You said the file was being written to a temp file which makes me think you're confusing the toolbox option and the file transfer option. The toolbox is meant for immediate execution of .exe and .bat scripts not for a file transfer, hence the change to save the toolbox item in a temp file vs storing it on a customer's machine. Our copy and paste/drag and drop option as well as the file transfer option do give you more flexibility on where a file is placed. This will allow you to store it for later use.
A .scapp file is basically a renamed .zip archive that the ScreenConnect Toolbox knows to handle a bit differently. When a .scapp file is executed from the Toolbox, it copies all of the tool's contents into the same directory on the remote machine and then executes the first item alphabetically. So if you have a tool that must run from a certain directory, you can create a .bat file that copies the tool into this directory and then executes it.
After creating the .bat file, ensure that it is named correctly, create a .zip file of both items, change the .zip extension to .scapp, and then copy it into your ScreenConnect Toolbox. Each time this .scapp is executed, it will copy the .exe to the specified location and then execute it, saving a few clicks for the Host.
I do not think you really read what I wrote as I indicated in my post I was in fact pulling down installs (.exe/.msi/.cmd [bat was win3.1]) from the toolbox and trying to install them. I suggest you go back and REread what I wrote with a clear open mind.
Are you saying you are intentionally downloading .bat and .exe files (PROGRAMS) from my toolbox, not intended for my cleint, into my clients DOCUMENTS folder in HIS profile? You do understand what the word "Documents" means??? I think someone changed that and it was realized after the fact. Then instead of solving the problem, and putting it back, you monkeyed it by just deleting everything on disconnect.
Having stated to me the nature of the toolbox I question your sanity for changing it the way you have. If I am downloading an .exe file to install or in many cases a tool to clear a virus... WHY oh WHY would I want to stay connected during that entire time? I am forced to though.. because if the connection drops part way or I disconnect the install gets hosed and sometimes even the computer does. Why would you risk having executable files not intended for the client, left in the clients profile? In his documents folder of all places?
I have complained to your office many times over the past 8 or so months about this. I always get blown off. I finally had someone tell me to post here when I complained loud enough. Read my bullet points in the original post.. you will see this amazing feature, and the reason I bought your product, has been butchered.
If you choose not to fix this I will be holding you liable for all the time and money we have invested into learning and cultivating your product as we move to another one. And I will be very public about it.
If you want to be super fancy, add a button to clear the download folder instead of doing it automatically for users like me who are doing bigger tasks from further away. Although I would never use it because I *like* to leave my tools behind for later use.
The AcroCleaner is not an uninstaller and should NOT be used as such. Adobe provides the utility as a least resort to repair machines after a failed or partial uninstall. Always uninstall products via standard, supported methods.
While most installs, uninstalls, and updates operations happen without incident, there are cases where a user may not be able to complete such tasks due to some registry or file conflict on the machine. This is particularly problematic when permissions set on plist entries or files prevent the successful installation of new installs and/or updates. The cleaner tool fixes such issues by cleaning up corrupted installations, removing or fixing corrupted files, removing or changing permissions registry entries, etc.
7fc3f7cf58