Jump to content
Jas

Explorer restart script

Recommended Posts

Hi All,

I am hoping someone can help with this. I am trying to runa a simple batch script:

taskkill /im explorer.exe /f
start explorer.exe
exit

The issue I am having is that it executes the task kill ok but it does not start explorer.exe. I have tried the process kill & process execute without luck also. 

My goal due to windows 1909 search explorer issue is to add this to the labtech tray icon menu so our customers can restart explorer.exe themselves until a valid fix has been identified. I am just struggling with the starting of explorer.exe via the script.
Issue: https://www.bleepingcomputer.com/news/microsoft/windows-10-1909-kb4517245-update-causes-file-explorer-issues/ 

Thanks in advance for any help :)

 
Edited by Jas

Share this post


Link to post
Share on other sites

I think from your description is that you want a file explorer window to open also after the execution?

The script is working as intended , it kills the task , and start the background process so you can open it manually.

If you try this , it will kill the process, start it again and then open a new file explorer window.

taskkill /im explorer.exe /f
SLEEP 2
start explorer.exe
SLEEP 2
start explorer.exe
Exit

 

Share this post


Link to post
Share on other sites

Thanks P_ern for getting back to me.

Same result sorry. If I run this as a batch file it works fine on the machine. If I push it out through automate it does not start explorer back up. I have to manually ctrl+alt & Del then run and type explorer.exe to get the taskbar etc back,

tried as user and admin.

Share this post


Link to post
Share on other sites

I have resolved. Thanks for your help p_ern.

I found that if I ran the command as console shell rather than batch script or powershell script I could run this as intended.

I have now been able to add this to the systray icon and enabled my end users the ability to restart file explorer. I have seen the fix has been resolved in the upcoming release.

 

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.


×
×
  • Create New...