Uninstall software from script
If your package really does use different productcode GUIDs, then the designers of the MSI package did not design the package correctly. I would verify whether that's really the case before attempting to use scripting to solve anything.
Use this code it will create a Log. If you running windows 7 with UAC make sure you launch the script from a elevated command promt I don't recommend using On Error Resume Next at the top of a script. This disables error handling for the entire script and makes things very difficult to troubleshoot. Each one has a different GUID. Is this the incorrect place to find the GUID?
Is the universal one you're speaking of located elsewhere and I'm just an idiot? Please keep in mind I'm not a sysadmin just a humble helpdesk minion , I had all of this dumped on me this morning after they fired the guy, so yeah, I'm kind of learning as I go here so I totally could be missing something here.
Please, if I've posted in the wrong area, or this otherwise not the correct place to ask this question, please let me know. This is what the script is searching for you may need to chagne this line if the program name doesn't contain Nod Here is a JScript script that outputs the product names and product codes on the local computer.
Save this script as getProductCodes. Office Office Exchange Server. Not an IT pro? Script Center. Sign in. United States English. Ask a question. Quick access. You need the uninstall string like dbeato mentioned, and assuming you're probably going to want to use it silently no GUI or user interaction the command would look like this:.
This is what you're looking for. A batch command to uninstall,upgrade or install an application. You don't need to know the path of the application. It's using UninstallString in the registry to remove the software which is a lot stable than wmic. I found wmic can only uninstall a few applications e. Java successfully on Windows I would like to add that you can uninstall windows service with the help of Action1 much more easier.
Our software can uninstall Windows services on multiple workstations at once without using any batch files or PowerShell. To continue this discussion, please ask a new question. Laplink Software, Inc. Neil Laplink. I have to query over a thousand computers, and in our testing, this query takes nearly five minutes to complete—that would be three and a half days for only one query.
Hello BT,. Microsoft Scripting Guy, Ed Wilson, is here. I immediately encouraged him to write a guest blog about this issue. The commands and the output from the commands are shown here. The easy way to get this information is to use the Get-WmiObject cmdlet to query for the information. I only need to do this once, and I will have the three pieces of information. A table is a nice way to display the information.
In the code shown here, I use the Get-WmiObject cmdlet gwmi is an alias to return product information, and then I pipe the management objects to the Format-Table ft is an alias cmdlet for display. The following image displays the commands and the output from the commands.
The following image shows massive product reconfiguring going on. The query to return the three parts of the composite key only needs to run once; the values do not change. It is also possible to use the Get-WmiObject cmdlet and a filter to improve the performance of the command a little bit.
The nice thing about this command is that it returns the information that is required by the [WMI] type accelerator. The command and associated output are shown here. Name : Microsoft Silverlight. Vendor : Microsoft Corporation. Version : 4.
Caption : Microsoft Silverlight. When I have the three pieces of information the IdentifyingNumber , the Name , and the Version , it is time to create the key.
This is where quite a bit of experimentation could be required. I have to use the back tick grave character to escape inside quotation marks.
I have to escape the quotation mark and the opening curly bracket for the IdentifyingNumber property. I also have to escape the closing curly bracket and the closing quotation mark. I then have to escape the quotation marks that surround Microsoft Silverlight, in addition to the quotation marks for the Version property.
There are also two quotation marks at the end of the ClassKey.
0コメント