Restarting explorer.exe only opens an explorer window

南笙酒味 提交于 2019-12-03 22:16:18

I think user1631170 is on to something, "I wonder if some part of Win-RAR is running in 32-bit mode? Could you even start explorer64 running from a 32-bit process? I am pretty certain that Windows won't do that."

When I start explorer.exe from ProcessHacker (32-bit process manager), I get an explorer window.

But I can force it to start the 64-bit explorer with this:

%systemroot%\sysnative\cmd.exe /c start /B explorer.exe

sysnative is a keyword that Windows recognizes to bypass the file system redirection for 32-bit/64-bit (http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx Enjoy!

sparrowt

I had this same problem and found that all the solutions here still didn't work from a batch script.

None of these worked completely:

start explorer.exe
start explorer
explorer.exe
explorer

because they all either opened a window (and didn't show the taskbar again), or the batch script then hung thereafter and couldn't execute any more commands

I found that this line in the batch file did work (after killing explorer.exe):

start "" "%windir%\explorer.exe"

and also allowed other commands to be executed after it in the script

This works in Windows 7:

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

For restarting explorer.exe, this worked for me.

powershell.exe Stop-Process -processname explorer
panda-34

Try

%windir%\explorer.exe
start %windir%\explorer.exe
start /d%windir% explorer.exe

When you run explorer.exe from an 32-bit application in 64-bit windows, the path will be redirected to the SysWOW64 directory which contains the 32-bit explorer.exe.

In XP64 it wasn't not such a big deal. In the taskmanager you can see the 32-bit explorer.exe running but it did start as the shell. In Windows 10 (as I came to this problem, it looks like it is introduced in Windows 7), the 32-bit explorer.exe is a stub which creates a new instance of the 64-bit explorer.exe. It probably passes a path on the commandline here so the 64-bit explorer.exe opens a window instead of starting the shell.

So it is still like before that you can control whether a window or a shell should be started by starting explorer.exe with or without a path as commandline parameter.

Instead, you should force starting the 64-bit explorer.exe from the 32-bit application and all is ok. To do this, one method is using the sysnative directory as mentioned above. But another method is to use Wow64DisableWow64FsRedirection/Wow64RevertWow64FsRedirection.

I did the latter and can confirm it works nicely. For both CreateProcess and ShellExecuteEx API.

I have seen similar problems before doing this in C#. The process had to be invoked by calling explorer shell rather than explorer window, but I haven't had any problems in batch.

Try using this:

taskkill /im explorer.exe /f
explorer

The difference between the other answers being explorer rather than explorer.exe which has caused problems before for me.

This works on my Win7 x64 PC.

Hope this helps!

The other day, I was having a look through some of WinRAR's more advanced options and came across this tab:

As soon as I saw that I suspected it to be part of the problem and solution, as this issue only ever occurs on Windows 7 x64.

As suspected, using the Default64.SFX module instead of the default Default.SFX module entirely fixed the issue. Finally.

Paweł Liszka

Have same issue with Visual Studio.

What works for me (Win 7 Pro 64bit):

PPM on Project name select "Properties"

Configuration Properties > Build Events > Pre-Build Event

taskkill /im explorer.exe /f

Configuration Properties > Build Events > Post-Build Event

start "" "C:\Windows\explorer.exe"

But this make other problem (the IDE is frozen after the explorer runs) and now I'm only able to restart the IDE to run build command again...

Use this (.bat with administrative privileges) in x64 or x86

tasklist /fi "imagename eq explorer*" | find /i "explorer*"
if not errorlevel 1 (taskkill /f /im "explorer*") else (
start %windir%\explorer.exe

What worked for me in Windows 7 64 bit was "C:\Windows\expstart.exe" or just expstart.exe

Try adding a explorer.exe key to App Paths in the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\explorer.exe

(Default) C:\Windows\explorer.exe

Path C:\Windows

or copy the following to notepad and save it as a .reg file then run it:


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\explorer.exe] @="C:\Windows\explorer.exe" "Path"="C:\Windows"

Alex

Easy Context Menu

Just right-click on the desktop and choose Restart Windows Explorer. Enjoy!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!