WMI and GPO

G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

Hi,

I like to made a WMI filter that identifies the os version and language so I
can apply a software based on that information. Anybody knows how can I
acomplish this using WMI filters.

Best Regards,
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem",,48)
For Each objItem in colItems
Wscript.Echo "Locale: " & objItem.Locale
Wscript.Echo "Version: " & objItem.Version
Next

This is from Scriptomatic... Awesome tool... easy to use... (free!
http://www.microsoft.com/technet/community/scriptcenter/tools/wmimatic.mspx)

the loop may be unecessary in this case.

HTH

Kevin
AutoProf
http://www.autoprof.com/policy

"Emiliano G. Estevez" <eestevez@sistran.com.ar> wrote in message
news:uREYp0jpEHA.1300@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I like to made a WMI filter that identifies the os version and language so
I
> can apply a software based on that information. Anybody knows how can I
> acomplish this using WMI filters.
>
> Best Regards,
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

One more thing...
http://www.microsoft.com/resources/documentation/office/2003/all/reskit/en-us/oe_intb05.mspx

English =0409
Spanish = 3082
Portuguese (Portugal) = 2080
Prtuguese (Brazil) = 1046


"Emiliano G. Estevez" <eestevez@sistran.com.ar> wrote in message
news:uREYp0jpEHA.1300@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I like to made a WMI filter that identifies the os version and language so
I
> can apply a software based on that information. Anybody knows how can I
> acomplish this using WMI filters.
>
> Best Regards,
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

sorry for the bad form... I clipped a bit too much from the script. Make
sure you reference strComputer = "." as the first line in the script. Also
the Locale property comes out as 0409. This is the language version for the
endglish language pack. These could be resolved in the code if you need to
get more detailed. I didn't find a property in the Win32_* classes that
named 0409 as English. I am sort of convinced it is in there but didn't scan
too much. Anyone know?

Kevin

"Kevin Sullivan" <ksullivan@autoprof.com> wrote in message
news:uof266jpEHA.2948@TK2MSFTNGP11.phx.gbl...
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_OperatingSystem",,48)
> For Each objItem in colItems
> Wscript.Echo "Locale: " & objItem.Locale
> Wscript.Echo "Version: " & objItem.Version
> Next
>
> This is from Scriptomatic... Awesome tool... easy to use... (free!
>
http://www.microsoft.com/technet/community/scriptcenter/tools/wmimatic.mspx)
>
> the loop may be unecessary in this case.
>
> HTH
>
> Kevin
> AutoProf
> http://www.autoprof.com/policy
>
> "Emiliano G. Estevez" <eestevez@sistran.com.ar> wrote in message
> news:uREYp0jpEHA.1300@TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > I like to made a WMI filter that identifies the os version and language
so
> I
> > can apply a software based on that information. Anybody knows how can I
> > acomplish this using WMI filters.
> >
> > Best Regards,
> >
> >
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

Actually, Kevin, Emiliano, you can't put script code into a GP-based WMI
filter, so the code below, while a good starting point, can't be used as-is.
What you would want is something like this:

Root\CimV2; Select * from Win32_OperatingSystem WHERE BuildNumber=2600 AND
Locale=0409

What this filter would do is select all machines running XP (BuildNumber
2600) and using English as their language (Locale=0409)

Hope that helps.

--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
Check out http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Whitepapers and Utilities for all things Group Policy-related



"Kevin Sullivan" <ksullivan@autoprof.com> wrote in message
news:uof266jpEHA.2948@TK2MSFTNGP11.phx.gbl...
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_OperatingSystem",,48)
> For Each objItem in colItems
> Wscript.Echo "Locale: " & objItem.Locale
> Wscript.Echo "Version: " & objItem.Version
> Next
>
> This is from Scriptomatic... Awesome tool... easy to use... (free!
> http://www.microsoft.com/technet/community/scriptcenter/tools/wmimatic.mspx)
>
> the loop may be unecessary in this case.
>
> HTH
>
> Kevin
> AutoProf
> http://www.autoprof.com/policy
>
> "Emiliano G. Estevez" <eestevez@sistran.com.ar> wrote in message
> news:uREYp0jpEHA.1300@TK2MSFTNGP12.phx.gbl...
>> Hi,
>>
>> I like to made a WMI filter that identifies the os version and language
>> so
> I
>> can apply a software based on that information. Anybody knows how can I
>> acomplish this using WMI filters.
>>
>> Best Regards,
>>
>>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

Good point Darren. I tend to use Scriptomatic as a starting point and then
do the convesion into WQL myself.

Thanks for the clarification.

Kevin
"Darren Mar-Elia" <dmanonymous@discussions.microsoft.com> wrote in message
news:%23CO$7IkpEHA.3324@TK2MSFTNGP15.phx.gbl...
> Actually, Kevin, Emiliano, you can't put script code into a GP-based WMI
> filter, so the code below, while a good starting point, can't be used
as-is.
> What you would want is something like this:
>
> Root\CimV2; Select * from Win32_OperatingSystem WHERE BuildNumber=2600 AND
> Locale=0409
>
> What this filter would do is select all machines running XP (BuildNumber
> 2600) and using English as their language (Locale=0409)
>
> Hope that helps.
>
> --
> Darren Mar-Elia
> MS-MVP-Windows Server--Group Policy
> Check out http://www.gpoguy.com -- The Windows Group Policy Information
Hub:
> FAQs, Whitepapers and Utilities for all things Group Policy-related
>
>
>
> "Kevin Sullivan" <ksullivan@autoprof.com> wrote in message
> news:uof266jpEHA.2948@TK2MSFTNGP11.phx.gbl...
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")
> > Set colItems = objWMIService.ExecQuery("Select * from
> > Win32_OperatingSystem",,48)
> > For Each objItem in colItems
> > Wscript.Echo "Locale: " & objItem.Locale
> > Wscript.Echo "Version: " & objItem.Version
> > Next
> >
> > This is from Scriptomatic... Awesome tool... easy to use... (free!
> >
http://www.microsoft.com/technet/community/scriptcenter/tools/wmimatic.mspx)
> >
> > the loop may be unecessary in this case.
> >
> > HTH
> >
> > Kevin
> > AutoProf
> > http://www.autoprof.com/policy
> >
> > "Emiliano G. Estevez" <eestevez@sistran.com.ar> wrote in message
> > news:uREYp0jpEHA.1300@TK2MSFTNGP12.phx.gbl...
> >> Hi,
> >>
> >> I like to made a WMI filter that identifies the os version and language
> >> so
> > I
> >> can apply a software based on that information. Anybody knows how can I
> >> acomplish this using WMI filters.
> >>
> >> Best Regards,
> >>
> >>
> >
> >
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

Thanks a lot for your help.

Best Regards,

"Kevin Sullivan" <ksullivan@autoprof.com> wrote in message
news:O9y13NkpEHA.3876@TK2MSFTNGP15.phx.gbl...
> One more thing...
> http://www.microsoft.com/resources/documentation/office/2003/all/reskit/en-us/oe_intb05.mspx
>
> English =0409
> Spanish = 3082
> Portuguese (Portugal) = 2080
> Prtuguese (Brazil) = 1046
>
>
> "Emiliano G. Estevez" <eestevez@sistran.com.ar> wrote in message
> news:uREYp0jpEHA.1300@TK2MSFTNGP12.phx.gbl...
>> Hi,
>>
>> I like to made a WMI filter that identifies the os version and language
>> so
> I
>> can apply a software based on that information. Anybody knows how can I
>> acomplish this using WMI filters.
>>
>> Best Regards,
>>
>>
>
>