mbhasem.blogg.se

Wmic uninstall software with wildcard
Wmic uninstall software with wildcard







wmic uninstall software with wildcard
  1. #WMIC UNINSTALL SOFTWARE WITH WILDCARD HOW TO#
  2. #WMIC UNINSTALL SOFTWARE WITH WILDCARD WINDOWS 10#
  3. #WMIC UNINSTALL SOFTWARE WITH WILDCARD CODE#

You can see below that I'm creating an array from each registry path. It'd also be nice if we could enter a title and then be returned a single GUID.įirst, we need to pull together the results from each of the registry paths.

#WMIC UNINSTALL SOFTWARE WITH WILDCARD WINDOWS 10#

Hope this helps somebody: I’ve been using the registry-based enumeration in my scripts (as suggested by some of the answers above), but have found that it does not properly enumerate 64-bit software when run on Windows 10 圆4 via SCCM (which uses a 32-bit client).This is great, but not much use because I can't see which software title relates to each GUID. ObjFile.Write strValue & "," & version & "," & insDate & vbCrLf ObjReg.GetStringValue HKLM, strBaseKey & strSubKey, "InstallDate", insDate ObjReg.GetStringValue HKLM, strBaseKey & strSubKey, "DisplayVersion", version IntRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, "QuietDisplayName", strValue)

wmic uninstall software with wildcard

IntRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, "DisplayName", strValue) ObjReg.EnumKey HKLM, strBaseKey, arrSubKeys WriteList "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\", objReg, objFileįunction writeList(strBaseKey, objReg, objFile) WriteList "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\", objReg, objFile Set objFile = objFSO.CreateTextFile(outFile,True) Set objFSO = CreateObject("Scripting.FileSystemObject") Set objReg = GetObject("winmgmts://" & "." & "/root/default:StdRegProv") It dumps Wow6432Node as well as standard entries into “programms.txt”įrom command line type: wscript dump.vbs Const HKLM = &H80000002 I adapted the MS-Technet VBScript for my needs.

#WMIC UNINSTALL SOFTWARE WITH WILDCARD CODE#

The code itself to interrogate the registry is even easier than using WMI. My current code has dropped WMI in favor of using the registry. Unfortunately, there doesn’t seem to be a way to get WMI to list all programs from the add/remove programs list (aka Programs and Features in Windows 7, not sure about Vista). See my comment that describes 32-bit vs 64-bit behavior in that same post here:

wmic uninstall software with wildcard

If I figure it out, I’ll try to remember to report back here.Įntries for 32-bit programs installed on a 64-bit machine go in that registry location.

wmic uninstall software with wildcard

#WMIC UNINSTALL SOFTWARE WITH WILDCARD HOW TO#

I haven’t yet figured out how to get this list to be reported by WMI (although the program is listed as installed in Programs and Features). HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall I’m finding that registry entries are being written to I have been using Inno Setup for an installer. In future, if you decided to bring that item back to the list, you would simply run the registry file you stored. Since, by using this method you would lose the chance of using the Remove button from the add/remove list to cleanly remove the software from your system it’s recommended to export registry keys to a file before you delete them. This is not a method to uninstall programs, it will just remove the entry from what’s known to windows as installed software. Removing the registry key for a certain product from both of the above locations will keep it from showing in the add/remove programs list. Software name shown in the list is read from the Value of a Data entry within this key called: ProductName Wmic command and the add/remove programs also query another registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall Besides the most commonly known registry key for installed programs:









Wmic uninstall software with wildcard