Skip to content

Removing Application via package/script kills explorer.exe. How to restart explorer.exe?

Featured Replies

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!

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?

  • 4 weeks later...
  • Author

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'"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.