Launch Mac apps with command-line parameters from Windows running under Parallels

I love running Windows using Parallels Desktop on my MacBook Pro (yes, those of you who know me well are aware that it wasn’t that long ago that I was amongst the Mac clueless).  Parallels makes it easy to associate your files with Mac applications running on your host.  If you want to launch a Mac app from the command line, either PowerShell or cmd.exe, you just need to look in the following directory for the app to launch:

"C:\Users\rob\AppData\Roaming\Parallels\Shared Applications"

Note that you will need to replace my username (i.e. rob) in the path above with whatever account you are logged into in your Windows VM.

So, if I want to run the Sublime Text editor installed on my Mac host, I can just run the following from PowerShell:

& "C:\Users\rob\AppData\Roaming\Parallels\Shared Applications\Sublime Text (Mac).exe"

However, when I tried to pass a command-line parameter to this app, I couldn’t get it to work.  I was trying to pass the file that I wanted to open in Sublime Text from the command line, but Sublime always opened to a blank document.

Thanks to the fine folks at Parallels Support on Twitter, I got the solution: You must pass the full path to the file, not the relative path. It worked!

Now I had one more problem.  From PowerShell, I typically pass the relative path of a file (if I pass any path at all) to apps at the command line.  So, I needed to find a way to pass either the relative path to the file or the full path, if I already have it available.  So, I wrote a PowerShell function:

function s { & "C:\Users\rob\AppData\Roaming\Parallels\Shared Applications\Sublime Text (Mac).exe" (Get-Item $args[0]).FullName }

So, now I can run either of the following PowerShell commands to open a file in Sublime Text:

cd C:\Users\rob\Documents
s file.txt


s C:\Users\rob\Documents\file.txt

This means that I don’t have to install apps that I already own on my Mac in my Windows VM, as well.  This will save me from having to configure each of these apps twice.  This makes setting up new VMs really easy as well since they will just leverage my Mac’s configured apps.  Woohoo!


Map the Caps Lock key on your Surface Pro 3 to be the Insert Key

I have really missed the Insert key on my Surface Pro 3 (SP3).  In the process of searching for a key combination that replaced it, I learned that there wasn’t one.  Scott Hanselman posted how to remap the Insert key using SharpKeys.  This utility makes it really simple to make the change.

However, I was also curious about how to remap it by adding a value to the Windows Registry.  After reading about this on the Softpanorama web site, I found that I simply had to do the following:

    1. Go to Start->Run (or press Win+R) and type in ‘regedit’ to open the registry editor.
    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
      Note: Keyboard Layout, not Keyboard Layouts!

    3. Go to Edit->New->Binary Value and name it ‘Scancode Map’
    4. Now double-click and edit the value to the following:

      00 00 00 00 00 00 00 00 02 00 00 00 52 E0 3a 00 00 00 00 00

      Note that the 52 E0 represents the scan code for the Caps Lock key.

    5. Now log off and back in.  Pressing the Caps Lock key will now behave like the Insert key.
      1. If logging off and back in doesn’t affect the change, reboot your machine.

Thanks to Softpanorama for such a great post!


This post was migrated from

Viewing All of the Git Repositories in your TFS Team Project within Visual Studio 2013.3

I recently reconnected to a TFS 2013.3 Team Project after quite a while away.  I knew that additional Git repos had been added to the team project, but Visual Studio 2013.3 was not displaying them in Team Explorer.  It turns out that you need to click the Refresh button (see the red rectangle, below) to update the list of Git repos.  Once you do this, you can see (and thus clone) any of the existing repos.



This post was migrated from

Chocolatey Tip of the Day: cup all

If you use Chocolatey ( and you want to update all of the packages you already have installed, just enter the following at the command prompt and all will be updated:

cup all

If you don’t want to be prompted for confirmation for each package, then enter the following instead:

cup -y all


This post was migrated from

Fixing “The ‘CctSharedPackage’ package did not load correctly”

I started Visual Studio 2013 this morning and opened the About dialog to make sure that I was running Update 1 on this particular machine.  Before the About dialog was displayed, I got the following error dialog:

Microsoft Visual Studio
The 'CctSharedPackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\...\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml'.

Continue to show this error message?
Yes   No   

Ack!  What happened?  Apparently this is an issue with the Windows Azure Tools for Microsoft Visual Studio 2013 – v2.2.  Although further research shows that it’s a problem with previous versions of the Azure SDK, as well.  So, I went to Control Panel, opened “Programs and Features”, right-clicked on “Windows Azure Tools for Microsoft Visual Studio 2013 – v2.2”, and clicked “Change”.  In the “Modify Setup” dialog that appeared and clicked “Repair”.  This fixed the problem.


This post was migrated from

Load more