Jump to content


surfincow

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

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.