Productcode uninstall
The actual PowerShell application itself can also be missing from the machine even if. NET is installed. Finally I believe PowerShell can be disabled or locked by various system policies and privileges. If this is the case, you can try a few other ways to retrieve product codes.
My preferred alternative is VBScript - it is fast and flexible but can also be locked on certain machines, and scripting is always a little more involved than using tools. I can't think of any further general purpose options to retrieve product codes at the moment, please add if you know of any. Just edit inline rather than adding too many comments please. Or even use WMI queries from within your application like you do in the samples above using PowerShell , wbemtest.
If what you want to do is to uninstall the MSI package you found the product code for, you can do this as follows using an elevated command prompt search for cmd. Option 1 : Basic, interactive uninstall without logging quick and easy :. You can also enable verbose logging and run in silent mode if you want to, leading us to option Option 2 : Silent uninstall with verbose logging better for batch files :.
There is a plethora of different ways to uninstall. If you are writing a batch file, please have a look at section 3 in the above, linked answer for a few common and standard uninstall command line variants. And a quick link to msiexec. And the Technet version as well. For installed packages this is much more reliable. If the package is not installed, you still need to look in the MSI file or the source file used to compile the MSI to find the upgrade code. Leaving in older section below:. Then you look in the " Property table " for UpgradeCode it is possible for the UpgradeCode to be redefined in a transform - to be sure you get the right value you need to retrieve the code programatically from the system - I will provide a script for this shortly.
To open the cached MSI files, use Orca or another packaging tool. Here is a discussion of different tools any of them will do : What installation product to use?
If you don't have such a tool installed, your fastest bet might be to try Super Orca it is simple to use, but not extensively tested by me. Then find Orca in the start menu. Go time in no time If you don't have Visual Studio installed , perhaps you know someone who does? Just have them search for this MSI and send you it is a tiny half mb file - should take them seconds. If not, you can always download the Windows SDK it is free, but it is big - and everything you install will slow down your PC.
If you do, please just edit and add details here. If you have too many installers to find what you are looking for easily, here is some powershell to provide a filter and narrow it down a little by display name. I don't have enough Rep points to reply to Stein Asmul directly, maybe someone can message him, but here is a powershell one-liner I adapted from the VBScript solution which I found to be more reliable than the existing powershell one-liner, particularly when running as a non-admin, and it's much faster.
Pro-tip: Change the 7 to a 3 to find programs lurking as per-user installs rather than machine wide. There is also a very helpful GUI tool called Product Browser which appears to be made by Microsoft or at least an employee of Microsoft. It can be found on Github here Product Browser. You may take a look at MSI Finder. It lets you search for products or components by name, GUID or location, view their properties, as well as repair or uninstall individual products.
Disclaimer: I was looking for a similar solution, but couldn't find anything reliable or easy to use. So, I developed this tool.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 6 years, 8 months ago. Active 25 days ago. Viewed k times. The absolute simplest and quickest way: github. Add a comment. Active Oldest Votes. Can't use PowerShell? See "Alternative Tools" section below. Not an IT pro?
Windows Client. Sign in. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Asked by:. Archived Forums. Philm Philm 3, 27 27 silver badges 24 24 bronze badges.
Yes, using the mentioned library is the third possibility. It is a question of taste and usage. The lib is of course worth trying if you are doing many things with MSI.
I don't know it well. You have maybe to fulfill special license requirements for shipping your software, if you use that library as for similar open source. But good to know for everyone interested that you have the choice between several possibilities.
Technically WindowsInstaller. In fact WindowsInstaller. Originally, it was made for scripting tasks. Bravo11 Bravo11 2 2 gold badges 11 11 silver badges 23 23 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.
Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Visit chat.
0コメント