Jaan Posted November 9, 2012 Posted November 9, 2012 Hi Guys/Gals i need to make a WMI filter so only windows 7 and windows 8 32bit and 64bit are effected Not any windows xp or server based OSs. also i need to make sure the 64bit Architecture relates to the OS not the CPU. here is the filter i've made..... can anybody shine any light on this please? select * from Win32_OperatingSystem WHERE (Version like "6.1%" or Version like "6.2%") AND ProductType="1" AND (OSArchitecture = "64-bit" or OSArchitecture = "32-bit")
sted Posted November 9, 2012 Posted November 9, 2012 wouldnt select * from Win32_OperatingSystem WHERE (Version like "6.1%" AND ProductType="1" ) or (Version like "6.2%" AND ProductType="1" ) work if u=you dont care if x64/x86 why even ask? not saying this will work but looks simpler logic if nothing else or even come to think of it select * from Win32_OperatingSystem WHERE (Version => "6.1%" AND ProductType="1" ) 1
Jaan Posted November 9, 2012 Author Posted November 9, 2012 select * from Win32_OperatingSystem WHERE (Version => "6.1%" AND ProductType="1" ) this works does it? i like your logic
ChrisMiles Posted November 9, 2012 Posted November 9, 2012 SELECT * FROM Win32_OperatingSystem WHERE (Version LIKE '6.1.%') AND (ProductType = 1)
Jaan Posted November 9, 2012 Author Posted November 9, 2012 SELECT * FROM Win32_OperatingSystem WHERE (Version LIKE '6.1.%') AND (ProductType = 1) thats just windows 7 tho?
Jaan Posted November 27, 2012 Author Posted November 27, 2012 (edited) Hi guys whats the best way for me to include all 32bits OSs including and above vista (i need to exclude XP) i get an error when i use the following; SELECT OSArchitecture FROM Win32_OperatingSystem WHERE (version =>"6.0%" AND ProductType="1") AND (OSArchitecture='32-bit') Edited November 27, 2012 by Jaan
VeryPC_Tom_M Posted November 27, 2012 Posted November 27, 2012 SELECT OSArchitecture FROM Win32_OperatingSystem WHERE (version =>"6.0%" AND ProductType="1") AND (OSArchitecture='32-bit') Try: SELECT OSArchitecture FROM Win32_OperatingSystem WHERE (version =>"6.%" AND ProductType="1") AND (OSArchitecture='32-bit') This should work for Vista and 7 (and possibly 8): Step 7: Creating WMI and Group Filters
Jaan Posted November 27, 2012 Author Posted November 27, 2012 thx for the speedy reply i get the same error below; "A Syntax error occurred trying to evaluate a query string"
VeryPC_Tom_M Posted November 27, 2012 Posted November 27, 2012 I think I've spotted it.. Replace the first OSAechitecture with "*"
Jaan Posted November 27, 2012 Author Posted November 27, 2012 I get the same error im afraid.... after i get this wmi filter sorted im having a break... i feel like i making silly mistakes now! here's screenie
VeryPC_Tom_M Posted November 27, 2012 Posted November 27, 2012 select * from Win32_OperatingSystem Where (Version>='6.%' AND Producttype="1" AND OSArchitecture='32-bit') 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now