Jump to content

jjraleigh

Members
  • Posts

    3
  • Joined

  • Last visited

jjraleigh's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Any other suggestions for creating a new service?
  2. 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)
  3. Am I missing something (and I very well might be as I'm new to autoit)? When I try to launch Services.au3 or: #include <Services.au3> $sServiceName = "AAAA" $sDisplayName = "AAA" _Service_Create($sServiceName, $sDisplayName, $SERVICE_INTERACTIVE_PROCESS, $SERVICE_AUTO_START, $SERVICE_ERROR_IGNORE, "C:\Windows\System32\CALC.EXE") MsgBox(0, "", @error) I get: --------------------------- AutoIt Error --------------------------- [b]Line 65[/b] (File "C:Usersjoe.raleighDesktopScriptsServicesServices.au3"): Global Const $SC_MANAGER_ALL_ACCESS = BitOR( $STANDARD_RIGHTS_REQUIRED, $SC_MANAGER_CONNECT, $SC_MANAGER_CREATE_SERVICE, $SC_MANAGER_ENUMERATE_SERVICE, $SC_MANAGER_LOCK, $SC_MANAGER_QUERY_LOCK_STATUS, $SC_MANAGER_MODIFY_BOOT_CONFIG ) Global Const $SC_MANAGER_ALL_ACCESS = BitOR( ^ ERROR [b]Error: Variable used without being declared.[/b] --------------------------- OK ---------------------------
×
×
  • Create New...