ghernandez211
Posts: 24
Score: 0 Joined: 5/15/2008 Status: offline
|
Hello, I need help on creating a script based off the operating system, For example I have a program that I need to launch to the computers on my network but I dont want it to install on server in case someone login into one of them. I have already created the execution for this within my login script, This is what I have written to so far. This is a vb script that calls on the WMI, I want to execute something else from the result of what is called. Option Explicit 'On Error Resume Next Dim strComputer Dim wmiRoot Dim wmiQuery Dim objWMIService Dim colComputers Dim objComputer Dim strComputerRole Dim strcomputerName Dim strDomainName Dim strUserName strComputer = "." wmiRoot = "winmgmts:\\" & strComputer & "\root\cimv2" wmiQuery = "Select * from win32_computersystem" Set objWMIService = GetObject(wmiRoot) Set colComputers = objWMIService.ExecQuery _ (wmiQuery) For Each objComputer in colComputers strComputerName = objComputer.name strDomainName = objComputer.Domain strUserName = objComputer.UserName ________________________________ For example down here I would like to create and IF and endif statements that if the criteria is met then execute this fuction . Im pretty lost at this point and would like some help. Tried a couple of things but didnt work.
|