surfincow Posted March 3, 2015 Report post Posted March 3, 2015 Hello, I have a particular application that I need to remove. There appears to be some bug (most likely with the app) where when you run msiexec /x product.msi, the explorer.exe (desktop/start menu) process is killed. I have line in the script to detect if explorer.exe is running and if not, to start it, but the problem I am running into is that it is not starting explorer (desktop/start menu) but a normal explorer window (file browser). This only appears to happen when the ccmclient is executing the command. For example, if I manually kill explorer.exe and then restart it (either from task manager or from cmd prompt) the task bar and desktop return. If I do the same via a Package/Script an explorer window (file browser) appears. This seems like such a simple task and it works with other applications; however, for explorer.exe it does not. (in the example below, replace explorer.exe with notepad.exe and it works) Any idea why this isnt working? All hosts are Windows 7 64bit, and the script is running as user, not administrator. -How the process is started if not running cmd.exe /c tasklist /FI "IMAGENAME eq explorer.exe" | find /I /N "explorer.exe" || start explorer.exe Also, specifying the full path to explorer.exe does not work either. Thanks! Quote Share this post Link to post Share on other sites More sharing options...
Ath3na Posted March 3, 2015 Report post Posted March 3, 2015 Might be worth doing your testing under the system account Grab psexec from the internet (pstools) and do a psexec -i -s cmd.exe This should open a second cmd window. Whoami should show the system account. Test. Why does the uninstall cause explorer to close? Sometimes windows installer will behave differently if run with /qb instead of qn. If you log the uninstall of the MSI is there anything relevant in the log file? Does the application close explorer if you remove it via programs and features? Quote Share this post Link to post Share on other sites More sharing options...
surfincow Posted March 26, 2015 Report post Posted March 26, 2015 Hello, Turns out the msi installer would prompt to kill explorer and attempt to restart it or perform a reboot after install is complete. Since the windows were not shown (due to it being suppressed), explorer was killed but was unable to remove it. After trying many numerous msiexec /x $flag's the problem still persisted. The end solution was to use wmic to perform the removal. "wmic product where name='$product' call 'uninstall'" Quote Share this post Link to post Share on other sites More sharing options...