如何检测我的程序是否在“windows xp 模式”下运行在Windows 7下
背景: windows-7 的 Windows-xp 模式不提供完整的 Windows 实例(与 VMWare 虚拟机实例不同)。将文件写入“c:/Program Files”等存在限制,当用户在 windows-7 的 windows-xp-mode 上安装我们的软件时,该限制就会生效(当直接在真正的 windows-xp 上安装时,它可以正常工作)机)
是否可以检测程序是否在“windows 7”的“windows-xp”模式下运行?
安装程序(使用InstallAnywhere生成)是java程序,但我们可以运行普通的可执行文件(比如基于c++的程序)来收集有关机器的信息。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不要专门测试您是否处于 Windows XP 模式。相反,测试一下写入程序文件是否有问题;如果是这样,请采取您需要的任何解决方法。
我怀疑您的问题并不是专门由 Windows XP 模式引起的,而是由 XP 模式巧合引起的,但也可能在其他情况下发生;对您遇到的具体问题进行测试可以让您在所有此类情况下找到解决方法。
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.