0

Okay, so I've been having a very strange situation on my home computer. I'm writing a powershell script to do some basic stuff that I do on test rigs at work all the time for setup (create a shared folder on the desktop, pin some stuff to the task bar, etc), and I'm testing it at home.

I'm pinning stuff to the task bar (yes, I know, don't do it, etc, but I figure it's fine because it's a hack for test rig stuff, nothing to go into production) via a powershell script that executes the "Pin to Taskbar" verb on an executable. I've found that when I pin "c:\Windows\system32\cmd.exe" to the taskbar, it actually pins the Visual Studio Command Prompt for VS 2010 ...

It's quite strange, this happens even when doing it manually, so it has nothing to do with the powershell script.

It's quite strange. Even when I look at the link in 'C:\Users\\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar', I find that there's nothing ambiguous about the link, it points directly to the command prompt for VS 2010.

This seems pretty strange and I haven't been able to find anything similar using my google-fu.

Any ideas?

P.S. Windows 7 Home Premium, SP1.

I've got VS2010 Express installed (C++, C#, VB) and VS 2013 Express.

At work I'm running Windows 8.1, and have VS2005, VS2010, VS2013, but I haven't had a chance to test it at work yet to see if it's the same.

0

Instead of pinning the executable itself, try pinning the shortcut on the Start Menu (C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Command Prompt.lnk) Note that Microsoft builds the Command Prompt link into each user's profile rather than placing it in the All Users profile.

I use this technique in my deployment images to unpin Windows Media Player, Explorer, and IE from the task bar when new users log in. I have to because the path to IE is different on 64-bit vs. 32-bit machines.

It's odd that pinning the executable directly still causes the VS one to come up instead but I can see how that could've happened.

Another thing to note is that there is nothing special about the Visual Studio command prompt. All it does is launches it with a different home directory and some extra directories in the %PATH% environment variable.

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.