Install the Surface SDK SP1 Workstation Edition on x64

Posted May 14, 2009 2:28 AM Categories: .NET | Surface | 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.

Comments (32) -

Conrad Pöpke
5/22/2009 4:46:27 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)

Reply

Pierlag
6/10/2009 5:22:16 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

Reply

Brian Peek
6/10/2009 11:03:35 AM #

@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?

Reply

Jack Ukleja
7/12/2009 2:12:07 AM #

More discussion about the same topic here:

www.grumpydev.com/.../

Reply

Håvard Meling
7/31/2009 3:21:31 AM #

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

Reply

Brian Peek
7/31/2009 12:48:41 PM #

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

Reply

Gergő Attila Fár
8/18/2009 10:20:13 AM #

Hi Brian,

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

Reply

Tim Hurst
8/27/2009 9:26:35 AM #

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

Reply

Tim Hurst
8/27/2009 9:35:15 AM #

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

Reply

Eric Bradley
9/4/2009 3:19:09 PM #

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

Reply

Eric Bradley
9/4/2009 3:33:56 PM #

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

Reply

s3kShUn7
9/4/2009 6:13:25 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.

Reply

LInus
9/5/2009 10:44:40 PM #

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

Reply

ben campbell
9/8/2009 5:10:36 AM #

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

Reply

Eric Bradley
10/25/2009 12:29:57 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.

Reply

Chris Nicol
2/11/2010 8:42:48 PM #

Hey Brian ... thanks for the article ... really easy to follow and incredibly useful.

Reply

momoski
3/18/2010 1:46:29 PM #

use the extract command like someone posted earlier that works

Reply

Pau
5/7/2010 4:19:06 AM #

Thank you very much! It works quite good, except for the fact that when I close the simulator, the attrac application and others keep open and I have to close it using the task manager.

Someone knows how could this be possible?

Thanks in advanced,

Pau

Reply

Brian Peek
5/8/2010 7:52:06 PM #

@Pau, happens to me, too.  As stated, it's all unsupported and this is just one of the side effects.  You can kill the process in Task Manager once you close the Simulator window.

Reply

Spacy
2/2/2011 1:57:04 PM #

I can't get the extracted installer to run.   I did the extraction, used SuperOrca to remove that one LaunchCondition, and did the corflags /32 thing on setupcustomaction.  When I try to run the extracted, modified MSI, a window opens that says:

"This installation package could not be opened.  Contact the application vendor to verify that this is a valid Windows Installer package."

Reply

Spacy
2/3/2011 7:42:48 AM #

OK, the invalid installer package problem is that SuperOrca has a bug when you Save As... to the same file.  You wind up with a zero byte MSI, which is certainly rather invalid.  Turns out that you don't need to "save" your work at all in SuperOrca - it makes the MSI changes in place in the file.  (I guess Orca, which doesn't run on my system, requires the "Save" step.  Just don't do that when using SuperOrca.)

Reply

Spacy
2/10/2011 5:31:10 AM #

I have the SDK and simulator working (mostly) under Windows 7 x64 and Visual Studio 2008.

When I try to us VS 2010, I am able to design and compile. But "Start Debugging" launches some kind of canvas that does not seem to be the simulator.  I can push things around on it and click and so forth, but there's no way to do multi-touch gestures, rotate with the mouse, etc.

VS2008 connects to the Surface Simulator, but VS2010 doesn't seem to do that.  I am not sure what vshost.exe is doing under VS2010.

What's this about?

Reply

Brian Peek
2/10/2011 5:33:29 AM #

@Spacy, the SDK only works with VS08.  There is no support for VS10.

Reply

Arunjith K
4/29/2011 8:30:01 AM #

Hi Brian,
I have my app with framework .net 4.0 , and I had added few MultiTouch functionality in few windows using Touch Beta Toolkit. Now can I deploy this application on Surface Ver 1 Hardware. My point is whether Surface Ver 1 Hardware only accepts  Surface SDK 1 developed code.

Reply

Brian Peek
4/29/2011 8:48:01 AM #

@Arunjith, Surface v1 only accepts Surface SDK 1 developed code.  The Touch Beta Toolkit is only for Windows 7, and the Surface table runs Vista under the hood and is not upgradeable.

Reply

Arunjith K
5/4/2011 5:36:35 AM #

Hi Brain,

I installed the Surface SDK1 successfully on my dev environment - Win 7 64 bit.
But when I run the Simulator tool I get error saying:
An unhandled exception ( " System.BadImageFormatException ") occured in SurfaceSimulator.exe ...

Can you suggest any workaround on this. ?



Reply

Brian Peek
5/4/2011 8:20:03 AM #

@arunjith, make sure you've properly run through the steps with corflags (Step 5 above) to patch the executables to 32-bit only.

Reply

Arunjith K
5/6/2011 7:12:40 AM #

Thanks Brain,
Everything went fine. Simulator was launched. But I was not able to open any Sample apps in the Simulator, I was clueless. After a bit of googling I found in this link
msdn.microsoft.com/.../ee804872(v=Surface.10).aspx
that Surface Simulator doenst work in Remote Desktop. And I remotely connect my clients machine with LogMeIn.
Is there no workaround for me now ????

Reply

Brian Peek
5/6/2011 9:26:41 AM #

@arunjith, no work around for that....

Reply

Steffi Germany
10/30/2011 2:06:18 AM #

Hi Brian,

my installation of Surface SDK SP1 seemed to work as expected - had no errors during the installation following your instructions. Thanks for that!

However, when I start the simulator, I very often get an exception (shell doesn't work anymore or attract doesn't work anymore) - details showing a System.OutOfMemory Exception. If I choose to look for an online solution, sometimes the water simulation starts, but nothing else works. In other cases, the surface background starts normally (but rotated by 180°). Text says that water could not be started and I should check my graphics card. Clicking at the corner buttons (which are sometimes available) and then at the examples leads to "shell doesn't work anymore." When which error occurs seems to be arbitrary. When I start the samples from Visual Studio, I don't get an exception, but I also don't see a frame to choose tags instead of mouse clicks.

To sum up - my simulator doesn't work as expected.

In addition, the printTag function also does not work, althought I used the flag. I run a Windows 7 x64, 4GB RAM, graphics card: NVIDIA NVS 3100M.

Any ideas what is causing the errors?

Reply

Brian Peek United States
10/30/2011 9:09:46 AM #

@Steffi, I'm not sure what the problem could be.  I haven't seen that exception when trying to run the Surface tools.  Anyone else?

Reply

Markus Germany
1/15/2013 5:56:30 AM #

Hey Brian,
thank you, this was a big help for me.

I changed the steps 4 and 5 and used "<TARGETDIR from above>" from step 3. So i've now a full configured setup without the need to change it again after a new installation.

Reply

Add comment

My Info

  • View Brian Peek's profile on LinkedIn

Sponsored Ad

My Book

Sponsored Ad