Sign in to follow this  
Followers 0

Com Object

1 post in this topic

Hay, I need to create a service on my computer and thought i could use autoits Objects with the following web site:

I Tried the following

$colItems = ""
$strComputer = "localhost"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$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?

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0