how can I quickly check to see if a wmic product exists using batch? -
i trying uninstall software using:
wmic product name="xxxxxxx" call uninstall
how can check see if wmic product exists batch file without querying products, can take time batch execute?
thanks!
reg query
arguably fastest method, not reliable, theoretically.
reg query hklm\software\microsoft\windows\currentversion\installer\userdata /f "exact product name" /s /d /e|find "displayname">nul if errorlevel 1 reg query hklm\software\wow6432node\microsoft\windows\currentversion\installer\userdata /f "exact product name" /s /d /e|find "displayname">nul if errorlevel 1 echo "exact product name" not found in registry
to find exact product names containing microsoft
:
reg query hklm\software\microsoft\windows\currentversion\installer\userdata /s /v "displayname" | find "microsoft"
Comments
Post a Comment