不希望脚本在W7中运行,但在XP中运行 [英] dont want script to run in W7 but do in XP
问题描述
我有一个问题,我刚刚开始了一个Windows 7迁移项目,我最初被带到做GPO,现在我已经被要求做别的事了,我有点卡住了。基本上我们仍然在大多数机器上运行Windows XP,但很快就会开始将
迁移到7。我们运行批处理脚本,该脚本在AD中设置为用户配置文件的一部分,仅在XP中运行。对于Windows 7,图标和快捷方式都是通过GPO完成的。
我想要做的是运行这个批处理脚本,但只有在运行Windows XP的情况下才能运行。如果电脑正在运行Windows 7,我希望脚本退出而不做任何事情让GPO做它的事情。有没有人对如何做到这一点有任何想法? 提前谢谢你
I have an issue, i have just started a Windows 7 Migration Project and i was originally brought in to do GPO, now i have bene asked to do something else and i am a little stuck. Basically we still run Windows XP on most of our machines but will start migrating
over to 7 soon. We run a batch script that is set up as part of the users profile in AD and runs in XP only. For Windows 7, icons and shortcuts are all done via GPO.
What i want to do is run this batch script but ONLY if the pc is running Windows XP. If the pc is running Windows 7, i want the script to quit and not do anything and let GPO do its thing. Does anyone have any ideas upon how to do this? Thank you in advance
推荐答案
您可以使用 WM 我过滤。
SELECT * FROM Win32_OperatingSystem WHERE Version LIKE "5.1%" and ProductType = "1"
这篇关于不希望脚本在W7中运行,但在XP中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!