简体   繁体   English

如何在Windows 7下检测我的程序是否在“ Windows XP模式”下运行

[英]how to detect if my program is running under “windows xp mode” under windows 7

Background: Windows-xp mode of windows-7 does not give full windows instance (unlike VMWare virtual machine instance). 背景:Windows-7的Windows-xp模式不会提供完整的Windows实例(与VMWare虚拟机实例不同)。 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) 将文件写入“ c:/ Program Files”等有一些限制,这些限制在用户在Windows-7的Windows-xp-mode上安装我们的软件时生效(当直接在真实的Windows-xp上直接完成安装时,它可以正常工作机)

Is it possible to detect if the program is running under "windows-xp" mode of "windows 7"? 是否可以检测程序是否在“ Windows 7”的“ windows-xp”模式下运行?

The installer( generated using InstallAnywhere) is java program, but we can run normal executable(say c++ based one) to gather information about the machine. 安装程序(使用InstallAnywhere生成)是Java程序,但我们可以运行常规可执行文件(例如基于c ++的可执行文件)来收集有关计算机的信息。

Don't test for whether you are in Windows XP Mode specifically. 不要测试您是否专门处于Windows XP模式。 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; 我怀疑您的问题不是由Windows XP模式引起的,而是由XP模式偶然引起的,但在其他情况下也可能会引起; doing a test for the specific problems you have would allow you to put in a workaround in all such situations. 对您遇到的特定问题进行测试将允许您在所有此类情况下都采用解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM