C
Chris S
Hi there - I have never used WMI before but have been thrown in the deep
end. I need to determine the PC Model via WMI.
I am running a batch file that calls a WMI script (below). When I run the
script below (with a .vbs extension) alone I get a prompt giving me the PC
model, but I need to pass this back into the original batch file that called
this .vbs file. Does anybody have any suggestions?
<BEGIN SCRIPT>
set CSset = GetObject("winmgmts:").InstancesOf ("Win32_ComputerSystem")
for each CS in CSset
outtext = CS.Model
Next
wscript.echo outtext
wscript.quit 0
<ENDSCRIPT>
Thanks
Chris
end. I need to determine the PC Model via WMI.
I am running a batch file that calls a WMI script (below). When I run the
script below (with a .vbs extension) alone I get a prompt giving me the PC
model, but I need to pass this back into the original batch file that called
this .vbs file. Does anybody have any suggestions?
<BEGIN SCRIPT>
set CSset = GetObject("winmgmts:").InstancesOf ("Win32_ComputerSystem")
for each CS in CSset
outtext = CS.Model
Next
wscript.echo outtext
wscript.quit 0
<ENDSCRIPT>
Thanks
Chris