Surface SDK installation guide

Hi,
I won’t release a x32 how to because the Surface SDK SP1 is Win7 friendly so you have just to install it and then install the samples or other applications to get it running (see my post on customsurface input to know how to do that).

But if you are running x64, you may have to technical difficulties to get it working.
Here are some tools, msi, and tips to get it working.

First, you have to get some softwares. You’re going to need Visual Studio 2008 and the Windows 7 SDK to get this patch working. You’re also going to need patched msi to get the SDK and the applications installed. Unfortunatly, I can’t distribute all the msi patched for two resons : in one hand, it would be against the EULA, in the other hand, it would represent a file over 1.5Go and you would become crazy downloading it.
So here we go :
Please install Visual Studio 2008 with full installation and the Windows 7 SDK.

1°) Create a folder called “surface” in c:\\ . Copy the Surface SDK exe installer in this folder. Rename it to “Microsoft Surface SDK 1.0 SP1, Workstation Edition.exe” if it isn’t so.
Go back in c:\\, right click on the “surface” folder while holding shift. Click on “launch a command window here”. Now type/paste this

"Microsoft Surface SDK 1.0 SP1, Workstation Edition.exe" /extract c:\\surface  

And hit enter.

2°) Launch an elevated command prompt, navigate to the previous folder by typing “cd c:\\surface”. Now type/paste this

msiexec /a SurfaceSDKWE.msi /qb TARGETDIR=c:\\surface 

and hit enter.

3°) Now we are going to patch the msi in order to be able to install the SDK on a non Vista x32 computer. Now that you have the Win7 SDK installed, you have somewhere in your pc a mis called “Orca”. Search it and run it. You should get Orca installed. Then type in the start menu search box “orca” and launch it.
Now open the SurfaceSDKWE.msi from the c:\\surface\\ folder. Select LaunchCondition from the left pane. In the right pane, select the row labeled Installed OR NOT VersionNT64, right-click, and select Drop Row. This will remove the check for a 64-bit OS.
Save the MSI using the standard File –> Save menu option.

4°) Go in the start menu, then launch an elevated Vistual Studio command prompt (shortcut located in the Visual Studio 2008/Tools folder. Change to the c:\\surface\\Microsoft Surface\\v1.0 directory and then type in :

corflags setupcustomaction.exe /32bit+ /force 

5°) Install the SDK with the SurfaceSDKWE.msi in the c:\\surface\\ directory.

6°) Go in the start menu, then launch an elevated Vistual Studio command prompt (shortcut located in the Visual Studio 2008/Tools folder.
Change to the “C:\\Program Files (x86)\\Microsoft SDKs\\Surface\\v1.0\\Tools\\Simulator” and run the following command :

corflags SurfaceSimulator.exe /32bit+ /force 

Now change to the “C:\\Program Files (x86)\\Microsoft Surface\\v1.0” and run the following command :

for %i in (*.exe) do corflags %i /32bit+ /force 

Enjoy.

11 thoughts on “Surface SDK installation guide”

  1. Hi MashineGun,

    i found this .vbs could you tell me if this script makes the patching needed or do I still need to instal de Win7 SDK to install the Surface Sdk?

    – Script starts below this line
    Option Explicit

    Const msiOpenDatabaseModeReadOnly = 0
    Const msiOpenDatabaseModeTransact = 1

    Dim argNum, argCount:argCount = Wscript.Arguments.Count
    If (argCount < 1) Then
    Wscript.Echo “Please supply the name of the msi file to be modified.”
    Wscript.Quit 1
    End If

    ‘ Scan arguments for valid SQL keyword and to determine if any update operations
    Dim openMode : openMode = msiOpenDatabaseModeReadOnly
    openMode = msiOpenDatabaseModeTransact

    ‘ Connect to Windows installer object
    Dim installer : Set installer = Nothing
    Set installer = Wscript.CreateObject(“WindowsInstaller.Installer”) : CheckError

    ‘ Open database
    Dim databasePath:databasePath = Wscript.Arguments(0)
    Dim database : Set database = installer.OpenDatabase(databasePath, openMode) : CheckError

    ‘ Process SQL statements and delete the crap out of this installer!
    Dim query, view, record, message, rowData, columnCount, delim, column
    Set view = database.OpenView(“Delete from LaunchCondition”) : CheckError
    view.Execute
    wscript.echo “Launch Conditions Removed”
    Set view = database.OpenView(“Delete from InstallExecuteSequence where Action=’OnCheckSilentInstall'”)
    view.Execute
    wscript.echo “OnCheckSilentInstall step removed”
    Set view = database.OpenView(“Delete from Property where Property = ‘ISSETUPDRIVEN'”)
    view.Execute
    wscript.echo “Property ISSETUPDRIVEN removed”
    Set view = database.OpenView(“INSERT INTO Property (Property,Value) VALUES (‘ISSETUPDRIVEN’,1)”)
    view.Execute
    wscript.echo “Property ISSETUPDRIVEN added”
    database.Commit
    Wscript.Quit 0

    Sub CheckError
    Dim message, errRec
    If Err = 0 Then Exit Sub
    message = Err.Source & ” ” & Hex(Err) & “: ” & Err.Description
    If Not installer Is Nothing Then
    Set errRec = installer.LastErrorRecord
    If Not errRec Is Nothing Then message = message & vbLf & errRec.FormatText
    End If
    Fail message
    End Sub

    Sub Fail(message)
    Wscript.Echo message
    Wscript.Quit 2
    End Sub

    COPY EVERYTHING ABOVE THIS LINE
    To use this, copy the script above to a notepad fie and save it as RemoveOScheck.vbs file. Then simply drag the msi file running the version check overtop RemoveOScheck.vbs and it will simply open up the msi file, remove the check and save it.
    Please remember to make a backup of the msi BEFORE running the script.

    hope you can find time to reply to this comment. anyway thanks for the great info.

    mobius

  2. To use this, copy the script above to a notepad file and save it as RemoveOScheck.vbs file. Then simply drag the msi file running the version check overtop RemoveOScheck.vbs and it will simply open up the msi file, remove the check and save it.
    Please remember to make a backup of the msi BEFORE running the script.

    at least that is how i did it. apparently it works/does something.. don’t know if that is what is needed tho.

  3. downloaded the SurfaceSDKWE.msi from the Microsoft site, did the script thing, run the installer.. it actually started, even writing registry keys.. but then, out of the blue, it rolled back and undid everything id did previously.

    tried your method (just without the win7SDK) but its different since i got the .msi directly from MS site. dont have the .exe you mention.

    maybe, this guide is no longer up to date?
    should i get a diferent download from MS

    there is no workarround about downloading the Win7 SDK?

    thank you for your time and interest.

    mobius

  4. did the orca thing (found it! http://www.technipages.com/download… ) but it kept asking for the Visual C# 2008 express (i got the Visual C# 2010 express) so i ran it through the .vbs, after that i could finally install the SDK.

    did the corflags and all.

    yet when i open the simulator the “shell” crashes.

    guess i’m just out of luck.
    thanks anyway,

    mobius

  5. @mobius : I told you, when I publish how to, there are tested on several machines to be 100% sure, they can be sometimes too long, but they are made so that anyone can follow them and get it to work… Enjoy !

Leave a Reply

Your email address will not be published. Required fields are marked *