BrianPeek.com
A Compendium of Random Uselessness
Install the Surface SDK SP1 Workstation Edition on x64

image_thumb

Update 11/20/09: The Surface SDK is now available to everyone at the new Surface website!  The instructions below should continue to work just fine…let me know if they don’t.

Update 10/29/09: It appears that the version of the SDK available from the Microsoft Partner site comes as a straight .exe file.  To extract this back into the MSI file to follow the instructions below, execute the following command:

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

This should spit out a MSI file to the c:\surface directory and you can continue on with the instructions below.  Thanks to Tim Hurst for the info!


The Surface SDK SP1 Workstation Edition was released this week and while it will install (but is still unsupported) on Windows 7, it will not install on a 64-bit machine.  The installer has changed a bit, so my previous instructions will not work with this installer, but I have managed to get the new package to install and run.  And here’s how…

As before, this is a totally unsupported setup, so if official support from Microsoft is required, this is not for you.

Please note that you will still need to meet the other hardware and software requirements of the SDK.

To perform the actions in this guide you will need to install Orca, a tool for editing MSI files, included with the Windows SDK.  Unfortunately, this utility isn’t available separately and will require you to download the full SDK to get it.  You can download the Windows Vista or Windows 7 SDK here.

1) Extract the MSI to its individual files

This can be done with the following command performed in an elevated cmd window:

msiexec /a SurfaceSDKWE.msi /qb TARGETDIR=c:\surface (or some other TARGETDIR of your choosing)

When complete, you will have a new directory at TARGETDIR filled with a smaller MSI and all the files contained within the original MSI.

2) Remove the platform check from the MSI

Open the newly extracted SurfaceSDKWE.msi file in Orca.  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.

5-14-2009 5-52-27 AM

After the rows are dropped, save the MSI using the standard File –> Save menu option.

3) Patch the setupcustomaction.exe file

This executable is called during the SDK installation process.  Because the installer will launch as a 64-bit application, so will this executable, which will force it to write some registry values into the wrong location.  Therefore we have to patch this file using the corflags.exe utility included in Visual Studio and the .NET SDK. 

If you have the full Visual Studio installed, simply open an elevated Visual Studio Command Prompt from the Start Menu and the path to corflags.exe will automatically be loaded.  Otherwise, you should find this in the C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin directory and you can set your PATH environment variable appropriately.

With the path to corflags.exe in your PATH environment variable, change to the following directory:

<TARGETDIR from above>\Microsoft Surface\v1.0

Inside this directory, run the following command:

corflags setupcustomaction.exe /32bit+ /force

You will get a warning that the file is strong named signed.  You can safely ignore this.

Administrator Visual Studio 2008 Command Prompt (2)

4) Install the SDK

Now that the MSI and setupcustomaction.exe have been patched, run the extracted and patched SurfaceSDKWE.msi file from the TARGETDIR location, not the original MSI file.  As long as you have the other prerequisites installed, the SDK will install without issue.

5) Patch the executables / Build and fix the samples

These steps are identical to last time, so I will just link to the original blog post here.

And there we have it.  A patched and working Surface SDK SP1 running under Vista/Windows 7 x64.  As always, run this at your own risk, but let me know how it works out for you if you give it a try.


Posted Thu, May 14 2009 6:28 AM by Brian Peek
Filed under: , ,

Comments

Conrad Pöpke wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Fri, May 22 2009 8:46 AM

Hi, great to see this working on the surface. But i have a problem installing it. I have changed the flags with

corflags setupcustomaction.exe /32bit+ /force

but setupcustomaction.exe raises an 'System.IO.FileLoadException'  exception.

Trying to debug it leads to this:

An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module.

Additional information: Die Datei oder Assembly SetupCustomAction, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 oder eine Abhängigkeit davon wurde nicht gefunden. Fehler bei der Strong Name-Überprüfung. (Ausnahme von HRESULT: 0x8013141A)

Pierlag wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Wed, Jun 10 2009 9:22 AM

For debug : You must add post compilation command :

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\corflags.exe" $(TagetPath)$(TargetFileName) /32bit+ /force

F5 not working but you can attach to process and debug

Brian Peek wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Wed, Jun 10 2009 3:03 PM

@Pierlag, Conrad was having an installation problem which we eventually worked out.  Regarding your command, wouldn't it be easier to just create an x86 configuration for the solution instead of building an Any CPU and then patching?

Jack Ukleja wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Sun, Jul 12 2009 6:12 AM

More discussion about the same topic here:

www.grumpydev.com/.../surface-sdk-on-vista-x64

Håvard Meling wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Fri, Jul 31 2009 7:21 AM

My download does not contain an msi only exe install. Is the MSI extracted somewhere during the installation process?

Brian Peek wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Fri, Jul 31 2009 4:48 PM

I haven't seen an install that's an exe only...where did you get it from?

Gergő Attila Fár wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Tue, Aug 18 2009 2:20 PM

Hi Brian,

MSDN/MSDNAA subscribers have gotten Surface SDK in exe format. Unfortunately your method is not applicable on them.

Tim Hurst wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Thu, Aug 27 2009 1:26 PM

Mine is an exe only as well.  I downloaded the Surface SDK SP1 from the Surface Partner QuickStart site.

Tim Hurst wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Thu, Aug 27 2009 1:35 PM

Found the solution.  If you have the .exe version of the installer you can extract the MSI using the command line as follows:

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

Eric Bradley wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Fri, Sep 4 2009 7:19 PM

I have an exe file too. Really upset. Really wanted this to work

Eric Bradley wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Fri, Sep 4 2009 7:33 PM

I have an exe too. Can you show me the direct download link for the one you got?

s3kShUn7 wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Fri, Sep 4 2009 10:13 PM

Hey, I have an exe only install. It's on the surface webpage. ANd I really need help getting it to work on windows 7 x64. partner.surface.com/.../default.aspx If you know of the place where I can get the msi, i would owe you big time.

LInus wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Sun, Sep 6 2009 2:44 AM

I have an exe file as well.. downloaded from the surface website...

ben campbell wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Tue, Sep 8 2009 9:10 AM

I also only was able to acquire an exe. thats what the MSDN for my school has up.

Eric Bradley wrote re: Install the Surface SDK SP1 Workstation Edition on x64
on Sun, Oct 25 2009 4:29 PM

Guys, I found out the answer. While you run the exe, go to your temp file (google to find out where it is) there should be a file there that says something like surfacesdk.txt. Open it and it should tell you exactly where your msi is extracting to. Go to that location, copy the msi to your desktop, and follow the rest of the tutorial normally. MAKE SURE that when you are doing these steps, the non-working exe stays open, even if it has an error message. Or else the msi will delete itself. It took me a while to figure that out, but it should work.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?