how to detect if my program is running under "windows xp mode" under windows 7

879 Views Asked by At

Background: Windows-xp mode of windows-7 does not give full windows instance (unlike VMWare virtual machine instance). There are restrictions on writing files to 'c:/Program Files' etc, which comes into effect when user is installing our software on windows-xp-mode of windows-7 (it works correctly when installation is done directly on real windows-xp machine)

Is it possible to detect if the program is running under "windows-xp" mode of "windows 7"?

The installer( generated using InstallAnywhere) is java program, but we can run normal executable(say c++ based one) to gather information about the machine.

1

There are 1 best solutions below

0
On

Don't test for whether you are in Windows XP Mode specifically. Instead, test to see if you have problems writing to program files; if so, put in whatever workarounds you need to.

I suspect your problems aren't specifically caused by Windows XP mode, but rather by something that is coincidentally caused by XP mode, but might occur in other circumstances as well; doing a test for the specific problems you have would allow you to put in a workaround in all such situations.