DarkNecromancer Posted December 8, 2005 Share Posted December 8, 2005 Hay, I need to create a service on my computer and thought i could use autoits Objects with the following web site:http://www.microsoft.com/msj/0298/service.aspxI Tried the following $colItems = "" $strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $handle = $objWMIService.OpenSCManager( "NULL", "SERVICES_ACTIVE_DATABASE", "SC_MANAGER_ALL_ACCESS") $colItems = $objWMIService.CreateService($handle, "My Service", "My Service", "0", "SERVICE_WIN32_OWN_PROCESS", "SERVICE_DEMAND_ START", "SERVICE_ERROR_NORMAL", "C:\client.exe", "NULL", "NULL", "", "NULL", "NULL") but i have ABSOLUTLY NO IDEA how to use objects. when i run it i get "The requested action with this object has failed". Does anyone know how to do this or does anyone knoe how to add a service that is accesable to autoit? Link to comment Share on other sites More sharing options...
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