Debugging, References, Sysinternals, Windows
Leave a comment

The case of delayed run dialog initialization

Yes, I got inspired by Mark’s “the case of” series and hence the title of this post. I use a Windows Vista laptop at work and was facing an issue when I try to open Run dialog either by clicking on Start-> Run and pressing Windows + R key combination. It used to take more than 10 seconds to open up. I always wanted to see what was going wrong but never really cared to do that until it became really frustrating yesterday. So, I decided to use Sysinternal’s ProcMon to start my investigation. But before that I need to know what process to monitor. This is essential because process monitor gives lot of information all of which may not be really relevant to the issue I was facing. My commonsense and little bit of OS internals knowledge told me that it should be explorer.exe. To verify that it was correct, I opened Run dialog and then open Task Manager.

image

Now, when I right-click on Run in task manager and select Go to Process, it showed me explorer.exe. With that information, I started Process Monitor. I updated the filter to include events from only from explorer.exe.

Once process monitor started capturing events, I pressed the Windows + R key sequence to reproduce my Run dialog issue. Once – after a few seconds – the Run dialog was open, I stopped the capture and saved the events to a log. Here is what I found a bit mysterious while looking at the events.

image

As you see in the process monitor output, just before opening the Run dialog, there were some references to CSC and mapped network share. CSC – client-side caching — isn’t really something to worry about because it is just a offline file location for all the network shares. The immediate step was to remove the mapped network share and see if the problem persists. I disconnected the network share from Windows Explorer and checked opening Run dialog again. My initial suspicion was right – this time Run dialog opened in a split second 🙂

Okay, but my investigation did not stop there because I cannot have the network share disconnected. It is my home share and it will get reconnected every time I re-login. So, disconnecting that may be a workaround but not the actual solution. With whatever data I have, I started searching Internet for some related information. I found quite a few places / posts talking about this. However, this KB article was the most important data point.

image

Bing-o..!! Though, this article says that this applies only to Windows 2000 family, it “really” applies to Windows Vista too. A closer look at my environmental variables showed me that %HOMEDRIVE% is set to a network share. Opening Run dialog triggers reading the home drive and then initializing the dialog.

This KB also suggests a workaround of adding StartRunNoHOMEPATH entry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer to avoid searching for the home folder before opening the run dialog. I just needed to addthis REG_DWORD entry with a value of 1.

That is it..adding this registry and logoff/login solved my issue. This may sound really simple with so much information on the Internet already. But my intention was to get some data before I start searching for the solution or a workaround. As always, sysinternal’s ProcMon proved to be really handy.

Filed under: Debugging, References, Sysinternals, Windows

by

Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.