WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WMI
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WMI Enabled UDF

Keywords:  WMI Enabled UDF  WMI_Enabled

#defineFunction WMI_Enabled()
   IntControl(73,1,0,0,0)
   Locator = ObjectOpen("WbemScripting.SWbemLocator")
   Service = Locator.ConnectServer()
   Security = Service.Security_
   ObjectClose(Security)
	ObjectClose(Service)
   ObjectClose(Locator)
   Return @TRUE
   
   :WBERRORHANDLER
   LastError()
   Return @FALSE
#endfunction

;Check if WMI is enabled
flag=WMI_Enabled()
Message("Return Value",flag)

Article ID:   W15786
File Created: 2004:04:02:12:23:52
Last Updated: 2004:04:02:12:23:52