Extracting and Installing the Surface Samples

The Microsoft Surface sample files are included in the Surface Code Samples.zip file that is installed into the %ProgramFiles%\Microsoft SDKs\Surface\v2.0\Samples folder when you install the Surface SDK. You can extract the samples on a Windows 7 computer to open and run them in Microsoft Visual Studio 2010, and you can install them on a device made for Surface so that they can also be run from Launcher while Surface Shell is running.

Extracting and Installing the Samples

  1. On the Start menu, click Microsoft Surface 2.0 SDK, and then click Surface Samples.

    The %ProgramFiles%\Microsoft SDKs\Surface\v2.0\Samples folder opens in Windows Explorer.

  2. Extract the contents of the Surface Code Samples.zip file to a directory where you have write permissions.

    The source code for each sample application is extracted, along with a batch file called InstallSamples.bat.

  3. Do one of the following:

    • On a device made for Surface   Right-click the batch file, and then click Run as administrator.

      The batch file builds each SDK sample and creates the LNK files needed to register each application with Surface Shell. It then copies the LNK files to the correct directory so that all the applications will show up in Launcher. For more information about registering applications on devices made for Surface, see Registering Standard Applications.

      If the batch file fails, check to see that it is not being run directly from the ZIP directory and that it is being run as administrator. Alternatively, use the steps for a touch-enabled Windows 7 computer.

    • On a Windows 7 computer   Open the SDKSamples.sln file in Visual Studio 2010 or Microsoft Visual C# 2010 Express Edition, and then press Ctrl+Shift+B to build the solution.

  4. Do one of the following:

    • On a device made for Surface   Start Surface Shell by using the desktop shortcut. Browse the samples by using Launcher. If the samples are in a public directory (that is, any user can access them on the system), the samples will also be available in Surface mode.

    • On a Windows 7 computer   In Visual Studio 2010, in the Solution Explorer panel, right-click the project you want to run, point to Debug, and then click Start new instance.

      Use your mouse to interact with the application. If you want to simulate touch and other input, click the Start menu, click Microsoft Surface 2.0 SDK, click Tools, and then click Input Simulator. For information about how to use the Input Simulator, see Input Simulator.

SDK Samples in the Launcher

The SDK samples as they appear in Launcher on a device made for Surface

SDK Samples in Input Simulator

The SDK samples as they appear in on a Windows 7 computer, with Input Simulator running

Did you find this information useful? Please send us your suggestions and comments.

© Microsoft Corporation. All rights reserved.