When process ccmsetup.exe will disappear also the uninstallation. After couple of minutes process CcmExec.exe will disappear. Right after you execute the command run Task Manager ( Ctrl Shift Esc) in Details tab you will see new process running: ccmsetup.exe. $uninstallResult - will have the exit code. The uninstall process is silent by design. $uninstall32 = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach ).InvokeMethod("Create","$unInstallPath") This is very fast if you just know the name of the program you want to uninstall. The reason it was written as below is because it modifies the MSI to uninstall without intervention, which is not always the default case when using the native uninstall string. If the application is not installed by MSI it does not work.I believe it's -First 1 but I'm not sure. If there are more matches than 1 for the below script, it does not work and you must append the PowerShell filter that limits results to 1.I have not used PowerShell since, but I remember observing some issues: EDIT: Over the years this answer has gotten quite a few upvotes.
0 Comments
Leave a Reply. |