fly Posted August 17, 2006 Posted August 17, 2006 Thanks to the Scriptomatic, I can see how to display information. However, I'm a little foggy on how to actually set information. I have the following code: Set objLocator = WScript.CreateObject("WbemScripting.SWbemLocator") Set objServices = objLocator.ConnectServer(".", "root/CIMV2") strWMIObjectID = "Win32_Service.Name=""Messenger""" 'Be excact here! Set objService = objServices.Get(strWMIObjectID) objService.ChangeStartMode "Manual" objService.StartService But am unsure how to convert this. I read through a couple of pages of searches for the term 'WMI', but wasn't able to figure anything out. So here I am...
lod3n Posted August 17, 2006 Posted August 17, 2006 (edited) $objLocator = ObjCreate("WbemScripting.SWbemLocator") $objServices = $objLocator.ConnectServer(".", "root/CIMV2") $strWMIObjectID = "Win32_Service.Name=""Messenger""" ;Be excact here! $objService = $objServices.Get($strWMIObjectID) $objService.ChangeStartMode ("Manual") $objService.StartService() Edited August 17, 2006 by lod3n [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
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