4

I ran into a problem on a PC a few months ago and have really now got to look at (partly because I thought it was due to a failing stick of RAM that was causing BSODs).

My PC runs Windows 7 x64

When I remote desktop to this PC, I noticed some of the shortcuts in my taskbar didn't work, specifically:

  • Explorer: "Can't open this item. It may have been moved, deleted..." etc
  • Visual Studio 2013: "A problem occurred... ...To fix run devenv.exe /resetsettings"
  • SSMS 2012: "Exception has been thrown by the target of the invocation"

Other shortcuts seem fine (e.g. Excel, Outlook, IE, Chrome, Firefox, Notepad++, LINQPad)

When I navigate to the actual program files (e.g. devenv.exe) and run them, the same error occurs.

So I've focused on explorer. If I run explorer.exe in the Run prompt it works. If I run the shortcut property "%windir%/explorer.exe" it says that it cannot be found. If I run "%windir%" in explorer or the Run prompt, it says it can't find it.

So I'm wondering if %windir% is the problem (for instance, do SSMS and VS have files that they refer to that use that environment variable)?

However, if I set %windir% after it disappears, the problem with starting VS and SSMS, and Explorer from the taskbar persist. So I am not sure that %windir% is the problem.

The problem is not just when connected over remote desktop. Once I have remoted to that PC, when I later return to it in person, it still has the problem. Only a log off and log on fixes it.

Any thoughts would be most appreciated.

  • Can you please check the scheduled tasks? I know there is a remote connection logged on or something like that - maybe that is altering your settings. – cdavid Jan 23 '15 at 3:17
  • Thanks @cdavid - I've looked through the Scheduled Tasks and can't see anything that particularly jumps out. There's nothing obviously connected to Remote Connection logging on that I can see. Thanks again for the suggestion. – alergy Jan 23 '15 at 9:31
  • I've edited my answer above as I've just tried manually setting %windir% after the problem with no discernible effect on resolving the issue. – alergy Jan 23 '15 at 10:01
  • 1
    I wouldn't say the question is a duplicate, but the cause and answer are in the question linked above - thanks... – alergy Feb 3 '15 at 12:02
5

I have been fighting with this same issue for a few months.

I finally found the answer to my situation here:

Cannot resolve %windir% / Cannot modify %path% or %path% being reset on boot

Summary of the solution: "make sure your path is < 2048 characters."

I had installed a trial version of software that added 635 total characters to my path, making it longer than 2048 total characters. Once I shortened my path, I was able to connect/disconnect without a problem.

| improve this answer | |
  • 1
    Thanks so much! This fixed the issue - not sure why you were downvoted (possibly the formatting - see the edits). The remote desktop factor in this definitely complicated getting to the bottom of this, so thanks for your answer. – alergy Feb 3 '15 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.