This will cause the log entries to be output to the console in addition to the log file. /hwinv - if specified (and the ConfigMgr agent is installed on the system) runs a hardware inventory at the endįor testing purposes, simply don’t specify the uninstall switch./uninstall - if specified actually runs the uninstall string. The uninstall software script presented here takes one parameter (without which the script does almost nothing): Creates (or appends to) a log file (called Uninstall-Software.log) in the temp directory of the user running the script or the ConfigMgr logs folder if the ConfigMgr agent is detected.Outputs the number of matching products found to the console/stdout.Runs the fixed up uninstall string to uninstall the product.Adds /norestart if it’s not there already.Fixes up the uninstall string if needed.Grabs the Uninstall string from the entry.Finds and loops through entries by DisplayName that contain a specified substring.Searches through the Uninstall key in the registry (both 32-bit and 64-bit on 64-bit OSes).The uninstall software script I created (still VBScript to account for those systems still without PowerShell) does the following: So how can we address this challenge? Create a script of course. The Solution to Uninstall Software En Masse Another problem with doing this is that it only works for Windows Installer installations. See Win32_Product Is Evil and Why Win32_Product is Bad News! for details. The Win32_Product class, which this wmic command-line is using, is evil. Wmic product where (name="Adobe Reader") call uninstall the recommendation to use something like this: You may see in various forums, blog posts, etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |