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?

有帮助吗?

解决方案

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

其他提示

Are you using the C++ CRT in any way? I don't think that's supported. I'd even doubt that CreateFile is appropriate; and look into NtCreateFile instead.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top