I have a shortcut to a Cmd prompt configured like this:

Target: %comspec% /k "SET "TMP=F:\workspace" & "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat""
Start in: -Some path here-

This works fine. The command prompt opens in the specified path. But when i open the link with "Run as administrator" or i configure the shortcut with Advanced/Run as administrator, the command prompt will always open in C:\Windows\system32 instead of the specified Start-in-path. Why is this and how can i fix it so that the command prompt will open in a specified path?

  • You Really need that file to run with administrator privilege – Techie Gossip Jul 5 '17 at 14:53
  • @TechieGossip. No, but i need that the remaining prompt is one with admin privileges. – Scrontch Jul 5 '17 at 15:37
  • I think this link will help u. superuser.com/questions/87398/… – Techie Gossip Jul 5 '17 at 17:15
  • Yes, i found this too and it helps, thanks. Still searching for an explanation why "Start in" is disregarded when run as admin. – Scrontch Jul 6 '17 at 8:08

Your Answer

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

Browse other questions tagged or ask your own question.