From the Visual Studio Command Prompt, run this command:
Dumpbin.exe /headers c:whereyouputitsetup.exe
Where "setup.exe" is the setup EXE created by your installer creator. I'll post an example of the info you see that matters here:
OPTIONAL HEADER VALUES
10B magic # (PE32)
...
4.00 operating system version
0.00 image version
6.00 subsystem version // <=== here!!
0 Win32 version
...
The subsystem version number is important. VS2012 is the first version of Visual Studio that started setting this value to 6.00, the version number of Vista. Previous versions, as well as VS2012 when you target .NET 4.0 or earlier, will set this version number to 4.00
This is otherwise an important move ahead and part of phasing out support for XP. Windows version 6.00 and up, Vista, Win7 and Win8 pay attention to this number. They'll assume that your program is unaware of later Windows features and needs to have several appcompat shims turned on. The most notable one is appcompat in Aero, the desktop theme that displays windows with fat borders that are easy to click with a mouse. Windows will lie about those borders, telling you that your window is smaller than it actually is. A great source of confusion to programmers that try to make windows line up with each other.
The consequence of seeing 6.00 displayed is that your setup program cannot run on XP anymore. It is version 5.02.
So do make sure first that you do not target .NET version 4.5, it is not available for XP. Use 4.0 instead. If you still have trouble then contact the vendor's support and ask them how to control that number in the setup.exe file that the tool creates. A workaround is to run Editbin.exe with the /SUBSYSTEM option to change the number.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…