Jump to content
Sign in to follow this  

Com Object

Recommended Posts


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.