Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which windows subsystem is supported on a recovery disk

When running a standard Windows 7 Installation Disk in recovery mode, if you open up the command line and run a custom-built application you will receive the error 'subsystem not supported'. I have tried linking with /SUBSYSTEM:CONSOLE, WINDOWS and NATIVE, none of these work.

I had a little difficulty with a partition table (and may have found a bug, or at least 'stupid' behaviour from the partition manager included in windows) and so wrote a utility to fix it. My program uses 'Windows.h' to import CreateFile, however if need be I can use only standard C++ (Or even standard C) with no windows specific headers.

What do I need to do to get an application running?

like image 241
James Avatar asked Jun 17 '12 02:06

James


1 Answers

The Windows Recovery Environment is a superset of the Windows Preinstallation Environment.

Windows PE is a stripped down version of windows, lacking many subsystems including WoW (Windows on Windows).

This means that 32bit executables (or anything with a 32bit component) WILL NOT RUN on a 64-bit Windows PE disk. (Note that WinPE 32 cannot install/repair 64 bit systems and vice-versa).

The solution to my problem was to compile to 64 bit code -- a descriptive error message would have been nice Microsoft :|

Found after much searching: http://technet.microsoft.com/en-us/library/cc766093(v=ws.10).aspx

like image 190
James Avatar answered Oct 25 '22 01:10

James