So installing the latest version of AutoIT fixed my variable error...however I still cannot create a service with the examples I've found in this thread or anywhere else. (below is the code I'm using with some of the various formats I've tried commented out. All of them return Error 6 -- Invalid Handle. Which doesn't give me a whole lot to go on.
Has anyone successfully created services with this UDF? I've searched google, this form and everywhere else and I can see successfully manipulation of services but no one is creating.
#include <Services.au3>
$serviceexe="C:\Windows\System32\CALC.EXE"
$sServiceName = "Testing"
$sDisplayName = "JoeTest"
$SERVICE_INTERACTIVE_PROCESS2 = 0x00000110
;_Service_create($sServiceName,$sDisplayName,$SERVICE_INTERACTIVE_PROCESS2,$SERVICE_AUTO_START,"",$serviceexe)
;_Service_Create($sServiceName, $sServiceName, BitOR($SERVICE_INTERACTIVE_PROCESS, $SERVICE_WIN32_OWN_PROCESS), $SERVICE_AUTO_START, $SERVICE_ERROR_NORMAL, '"' & @WindowsDir & '\system32\calc.exe' & '"',"Tcpip","Tcpip","Tcpip")
_Service_Create($sServiceName, "Au3Service " & $sServiceName, $SERVICE_WIN32_OWN_PROCESS, $SERVICE_DEMAND_START, $SERVICE_ERROR_SEVERE, '"' & 'c:\temp\calc.exe' & '"')
;_Service_Create($sServiceName, $sServiceName, BitOR($SERVICE_INTERACTIVE_PROCESS, $SERVICE_WIN32_OWN_PROCESS), $SERVICE_AUTO_START, $SERVICE_ERROR_NORMAL, '"' & @WindowsDir & '\' & @ScriptName & '"',"Tcpip","Tcpip","Tcpip") c:\windows\system32\calc.exe
MsgBox(0, "", @error)