After installing the last several releases of Visual Studio, you’ll find shortcuts to command prompts that automatically set up the PATH, INCLUDE, LIB, and other environment variables. At least with Visual Studio 2010 these command prompts have larger buffers and enable quick edit mode, but some people like to customize these shortcuts to their liking.
Since Visual Studio installs for all users, these shortcuts are protected and can only be edited by administrators. In Windows 7 you are simply prompted to elevate; however, in Windows Vista with UAC enabled, when you try to edit the shortcut you may see the following error message.
Error Updating Shortcut Unable to modify the shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010\Visual Studio Tools\Visual Studio Command Prompt (2010).lnk. Check to make sure it has not been deleted or renamed. OK
Error Updating Shortcut
Unable to modify the shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010\Visual Studio Tools\Visual Studio Command Prompt (2010).lnk. Check to make sure it has not been deleted or renamed.
OK
To customize the shortcut, you should copy it to a user-writable location. You should not modify the protected shortcut as that could cause it to be left behind if you ever uninstall Visual Studio. But rather than have a second entry in your Start Menu you can keep the same name and it will show up instead of the per-machine copy.
Now whenever you launch the shortcut from the Start Menu, you’ll be starting your copy with your changes. You’ll still need to delete your copy if you ever uninstall Visual Studio but now you can make all the changes you want without having to elevate.