- #Wmic uninstall name like install
- #Wmic uninstall name like update
- #Wmic uninstall name like software
#Wmic uninstall name like software
Link the policy to the OU where the computers you want to have the software uninstalled are, make sure they are not in the computers builtin container.Off cls ver | find "6.1" > nul if %ERRORLEVEL% = 0 goto W7 ver | find "5.1" > nul if %ERRORLEVEL% = 0 goto XP :XP :KillIE&JavaProcesses echo *** This will kill Browsers and Java Processes *** Rem *** taskkill /F /IM iexplorer.exe taskkill /F /IM iexplore.exe taskkill /F /IM firefox.exe taskkill /F /IM chrome.exe taskkill /F /IM jusched.exe taskkill /F /IM jp2launcher.exe taskkill /F /IM java.exe taskkill /F /IM javaw.exe taskkill /F /IM jqs.exe :UninstallingOldJREVersions echo.************************************************************************ echo.************************************************************************ echo.
#Wmic uninstall name like update
Product where name=”Google Update Helper” call uninstallĬlick OK and close the Group Policy Management Editorįor best practices make sure you have disabled the user configuration of the policy, once this is not needed, doing so will increase the speed the system process the policy.
#Wmic uninstall name like install
I could have chosen to put during Startup however it would delay the speed of the logon as the system would have to uninstall the software before let the user logon, also in my case I wanted to uninstall during the shutdown and in the next logon I’ll have another policy to install the latest version of what I want to be installed during startup. I choose to use Shutdown Script because I want the software to be uninstalled when the computer is being shutdown, that way nobody has to wait. Navigate the Policy like the picture bellow:Ĭomputer Configuration\Windows Settings\Scripts Right click on that policy and click edit: Now click again in Group Policy Objects, on the right side you should see the policy you just have created. Give your policy a name, I suggest: 1-Uninstall-Software Press WindowsFlag+R and type gpmc.msc, this would open Group Policy Management
Now that you know how it happens behind the scenes, it is time to put it on a group policy. Now we run wmic product get name again to confirm the software is no longer there:
In this example we will uninstall Google Update Helper. Now is time to uninstall what you no longer want This will list all installed software on the computer, this list is the same list in Programs and Features. Open command prompt admin and do like the image bellow: This recipe I’ll show you, worked for me so I hope it works for you. I like to do everything remotely and make the life of SD people easy, with that in mind imagine a situation where you have to uninstall a software in many clients, however you don’t want to go to advanced solutions such as SCCM.