Click here to see this bug on Connect.
Visual Studio 2013 configures Start Menu shortcuts differently to earlier versions. Specifically, it adds a shortcut to ‘Visual Studio Tools’ (%PROGRAMFILES(X86)%\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
), where Visual Studio 2012 added a directory called ‘Visual Studio Tools’ and added copies of the shortcuts. This is all a bit confusing, but the end result is that searching in the Start Menu/Screen won’t bring up results for useful things like the Developer Command Prompt or Spy++.
This annoyed me sufficiently that I wrote a PowerShell script (run it as administrator) to restore the shortcut directory:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$shortcutpath = "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013\Visual Studio Tools.lnk" $newshortcutdir = "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013\Visual Studio Tools" If (Test-Path $shortcutpath) { $shell = New-Object -COM WScript.Shell $toolsdir = $shell.CreateShortcut($shortcutpath).TargetPath # create directory if necessary If (-Not(Test-Path $newshortcutdir)) { mkdir $newshortcutdir } # copy shortcut files copy "$toolsdir\*.lnk" $newshortcutdir # hide old shortcut $shortcut = Get-Item $shortcutpath -Force $shortcut.Attributes = $shortcut.Attributes -bor [System.IO.FileAttributes]::Hidden } else { "Shortcut not found." } |
The Visual Studio Shortcuts directory doesn’t contain shortcuts to Spy++ (and a number of other programs). Here’s another script to restore shortcuts to Spy++:
1 2 3 4 5 6 7 8 9 |
$shortcutdir = "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013\Visual Studio Tools" $toolsdir = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 12.0\Common7\Tools" $shell = New-Object -COM WScript.Shell $spyshortcut = $shell.CreateShortcut("$shortcutdir\Spy++.lnk") $spyshortcut.TargetPath = "$toolsdirspyxx.exe" $spyshortcut.Save(); $spyshortcut = $shell.CreateShortcut("$shortcutdir\Spy++ (64-bit).lnk") $spyshortcut.TargetPath = "$toolsdirspyxx_amd64.exe" $spyshortcut.Save(); |
Thanks for this, I do wonder if this was by design or a bug no one caught.
I suspect it’s by design (the idea being to reduce the number of shortcuts), but I’ve raised a bug on Connect anyway: https://connect.microsoft.com/VisualStudio/feedback/details/935614/vs2013-creates-shortcut-to-visual-studio-tools-directory-preventing-start-menu-screen-search-from-retrieving-shortcuts-contained-within