ptrex Posted November 2, 2005 Share Posted November 2, 2005 (edited) Is anyone interested to run Au3 (compiled scripts) as a windows service ? Let me know, I have a solution. Just have to finalize a GUI for it. Maybe I can trade this in against a SQLite plugin OK since you all replied so enthusiastic. Here is the script. expandcollapse popup;------------------------------------- ; ; Run AutoIT Scripts as a service ; PTREX 03/11/2005 ; ;------------------------------------- #include <GUIConstants.au3> #include <GuiListView.au3> #include <Process.au3> #NoTrayIcon ;Declare Vars Global $objWMIService Global $strComputer = "." Const $OWN_PROCESS = 16;16 is own process Const $INTERACTIVE = true;True changes the $Own_Process to 272 is interact with desktop Const $NORMAL_ERROR_CONTROL = 1 Dim $Script, $SrvAny, $info, $Help ;Main Gui ;Generated with Form Designer preview, great Job !! GUICreate("Au3@Service", 570, 668, 289, 123, $WS_OVERLAPPEDWINDOW) $ListView1 = GUICtrlCreateListView("Service Name |Status", 24, 160, 520, 481, $LVS_ICON+$LVS_SORTASCENDING ) _GUICtrlListViewSetColumnWidth ($listview1, 0,320) $GUI_FileMenu = GUICtrlCreateMenu ("&File") $GUI_FileOpen = GUICtrlCreateMenuitem ("&Open..." ,$GUI_FileMenu) $Helpmenu = GUICtrlCreateMenu ("?") $Helpitem = GUICtrlCreateMenuitem ("Help",$Helpmenu) $Infoitem = GUICtrlCreateMenuitem ("Info",$Helpmenu) $Edit1 = GUICtrlCreateInput("Select a compiled script to start", 24, 20, 273, 21) $Checkbox1 = GUICtrlCreateCheckbox ("Interact with Desktop. (Your script has a GUI)", 24, 130, 280, 20) GUICtrlSetState (-1,1) $Button1 = GUICtrlCreateButton("Add Any Service", 24, 110, 93, 17) $Button2 = GUICtrlCreateButton("Delete Any Service", 120, 110, 120, 17) $Button3 = GUICtrlCreateButton("Open Services", 303, 110, 91, 17) $Button4 = GUICtrlCreateButton("Select Script ...", 24, 50, 91, 17) $Button5 = GUICtrlCreateButton("Assing Script to run" , 120, 50, 120, 17) GUICtrlCreateGroup ("Services Control", 400, 5, 140, 150) $RadioButton1 = GUICtrlCreateRadio("List All Services", 416, 24, 89, 17) $RadioButton2 = GUICtrlCreateRadio("List Au3 Services", 416, 54, 113, 17) $RadioButton3 = GUICtrlCreateRadio("Start Au3 Service", 416, 94, 120, 17) $RadioButton4 = GUICtrlCreateRadio("Stop Au3 Servioe", 416, 124, 120, 17) GUICtrlSetState ($RadioButton1,$GUI_CHECKED) GUISetState(@SW_SHOW) Dim $B_DESCENDING[_GUICtrlListViewGetSubItemsCount ($listview1) ] _List_Services1() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_FileOpen _File_Open() Case $msg = $infoitem Info() Msgbox(0,"Info",$Info) Case $msg = $Helpitem Help() Msgbox(0,"Help",$Help) Case $msg = $Button1 _Install_Service() Case $msg = $Button2 _Delete_Service() Case $msg = $Button3 _Open_Services() Case $msg = $Button4 _Select_Script() Case $msg = $Button5 _Assign_Script() Case $msg = $RadioButton1 _List_Services1() Case $msg = $RadioButton2 _List_Services2() Case $msg = $RadioButton3 _Start_Service() Case $msg = $RadioButton4 _Stop_Service() Case $msg = $Checkbox1 _Interact_Desktop() EndSelect WEnd Exit ;Functions Func _File_Open() $FileOD = FileOpenDialog("Select SrvAny.exe File", "C:\", "EXE (*.exe)", 3) $File = FileOpen($FileOD, 0) GUICtrlSetData($Edit1,Chr(34) & $FileOD & chr(34)) $SrvAny = (Chr(34) & $FileOD & chr(34) ) If $File = -1 Then MsgBox(0, "Error", "Unable to open file, or no file selected !!") EndIf EndFunc Func _Select_Script() $FileOD = FileOpenDialog("Select Au3 Script File", "C:\", "EXE (*.exe)", 3) $File = FileOpen($FileOD, 0) GUICtrlSetData($Edit1,Chr(34) & $FileOD & chr(34)) $Script = (Chr(34) & $FileOD & chr(34) ) If $File = -1 Then MsgBox(0, "Error", "Unable to open file, or no file selected !!") EndIf Endfunc Func _List_Services1() _GUICtrlListViewDeleteAllItems ($listview1) $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $colRunningServices = $objWMIService.ExecQuery("Select * from Win32_Service") For $objService in $colRunningServices local $Data = ($objService.DisplayName & "|" & $objService.State) GUICtrlCreateListViewItem($Data,$listview1) Next EndFunc Func _List_Services2() _GUICtrlListViewDeleteAllItems ($listview1) $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $colRunningServices = $objWMIService.ExecQuery("Select * from Win32_Service Where Name like '_Au%'") For $objService in $colRunningServices local $Data = ($objService.DisplayName & "|" & $objService.State) GUICtrlCreateListViewItem($Data,$listview1) Next EndFunc Func _Install_Service() If $SrvAny = "" Then MsgBox(0,"Warning ", "Select the SvrAny.exe using the File Open first") Else MsgBox(0,"Information","This has to be activated only ONCE !!") $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $objService = $objWMIService.Get("Win32_BaseService") $errReturn = $objService.Create("_Au3@Service" ,"_Au3@Service" , $SrvAny, $OWN_PROCESS, $NORMAL_ERROR_CONTROL, _ "Manual", $INTERACTIVE, "LocalSystem", "" ) EndIf EndFunc Func _Delete_Service() $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $colListOfServices = $objWMIService.ExecQuery ("Select * from Win32_Service Where Name = '_Au3@Service'") For $objService in $colListOfServices $objService.StopService() $objService.Delete() Next EndFunc Func _Start_Service() Local $var1 = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service", "ImagePath") If @error = -1 or StringRight ($var1, 11) <> "srvany.exe"&chr(34) Then MsgBox(4096,"", "RegKey SrvAny not yet created, or not correct"&$var1) Else Local $var2 = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service\Parameters", "Application") If @error = 1 Then MsgBox(0,"Warning","No Script has been assigned yet to the Any service!!") EndIf _RunDos("Net start _au3@service") EndIf EndFunc Func _Stop_Service() _RunDos("Net stop _au3@service") EndFunc Func _Open_Services() _RunDos("services.msc") EndFunc Func _Interact_Desktop() Local $var1 = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service", "ImagePath") if @error = -1 or StringRight ($var1, 11) <> "srvany.exe"&chr(34) Then MsgBox(4096,"", "RegKey not yet created, or not correct") Elseif GUICtrlRead($Checkbox1)= 1 Then RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service", "Type", "REG_DWORD", "272") Elseif GUICtrlRead($Checkbox1)= 4 Then RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service", "Type", "REG_DWORD", "16") EndIf EndFunc Func _Assign_Script() Local $var1 = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service", "ImagePath") if @error = -1 or StringRight ($var1, 11) <> "srvany.exe"&chr(34) Then MsgBox(4096,"", "RegKey not yet created, or not correct") Else RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service\Parameters", "AppDirectory", "REG_SZ", @WorkingDir) RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\_Au3@service\Parameters", "Application", "REG_SZ", $Script) EndIf EndFunc Func Info() $Info = "Sytem Requirements :"&@CR&@CR& _ "- In order to use this application you need to have 98/NT/2K/XP."&@CR&@CR& _ "- You need to copy the file SrvAny.exe to your Windows directory."&@CR& _ " Afterwards you will need to register this file as a service, once."&@CR& _ " See Help for more info" EndFunc Func Help() $Help = "Registering the SrvAny.exe file as a service :"&@CR& _ "- Go to the Windows directory where you have placed the SrvAny.exe file, using the FILE OPEN menu. " &@CR& _ "- Press the Add Any Service button. This procedure has to be done only once." &@CR&@CR& _ "Assigning a Script to the service :"&@CR& _ "- Use the Select Script button to pick a compiled script."&@CR& _ "- Press the Assign Script to run button, to link this to the service."&@CR&@CR& _ "Starting the service :"&@CR& _ "- Click the start Au3 Service radio button, to start your script service."&@CR&@CR& _ "Stopping the service :"&@CR& _ "- Click the stop Au3 Service radio button, to stop your script service."&@CR&@CR& _ "Open Services :"&@CR& _ "- This button will allow you to open the Services.msc." EndFunc You will need this file to put in your Windows Dir. This SrvAny.exe file(provided by MS), works as a wrapper for your custom services. Read the Help included in the Gui to proceed from there. This is a Test script you can use. If everthing works fine a countdown will appear in a msgbox. You can logoff and logon again and still see the countdown proceeding. sleep (3000) For $i = 100 to 1 Step -1 MsgBox(0, "Count down!", $i,1) MsgBox(0,"Services", "Test is still running",1) Next Update for 3.2.11.12 and later. Au3_Services.au3 Edited July 7, 2008 by ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
SumTingWong Posted November 2, 2005 Share Posted November 2, 2005 Is anyone interested to run Au3 (compiled scripts) as a windows service ?Let me know, I have a solution. Just have to finalize a GUI for it.Maybe I can trade this in against a SQLite pugin One of many tools out there - RunExeSvc Link to comment Share on other sites More sharing options...
ptrex Posted November 2, 2005 Author Share Posted November 2, 2005 @SumTingWong OK. How about NON compiled scripts ? Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ptrex Posted November 3, 2005 Author Share Posted November 3, 2005 @SumTingWong I checked out your suggestion. Thanks by the way !! But is seems more a utillty for the JAVA oriented JudoScripters. Not what I had in mind. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
SumTingWong Posted November 3, 2005 Share Posted November 3, 2005 @SumTingWongI checked out your suggestion. Thanks by the way !!But is seems more a utillty for the JAVA oriented JudoScripters.Not what I had in mind. I haven't actually needed to use it myself but I know colleagues who have used it to run compiled AutoIT scripts as services and it does work. Link to comment Share on other sites More sharing options...
ptrex Posted November 3, 2005 Author Share Posted November 3, 2005 @SumTingWong Could you check with your colleagues, and give us an example on how to use this. It might be interesting to all of us !! Thanks Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ptrex Posted November 3, 2005 Author Share Posted November 3, 2005 Script added in post #1 Could be modified to run uncompiled script (.au3 files), if there are requests for this. Regards Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 4, 2005 Share Posted November 4, 2005 This SrvAny.exe file(provided by MS)Hi, PTREX!You have un more recent srvany in Win2003-resource-kit (it run under XP).See here : http://download.microsoft.com/download/8/e...057/rktools.exe Link to comment Share on other sites More sharing options...
ptrex Posted November 4, 2005 Author Share Posted November 4, 2005 @Michel Claveau Thanks for the info. Just for my information, did you have problems running the older version ? Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
gcriaco Posted November 4, 2005 Share Posted November 4, 2005 Another tool: RunAsService Link to comment Share on other sites More sharing options...
ptrex Posted November 4, 2005 Author Share Posted November 4, 2005 @gcriaco Thanks for the input. I know there are lot's of these tools available elsewhere. But AutoIt makes nice GUI's to manage your Run as a Service dynamically. I like that a lot about AutoIT. I think this make it a nice playground And it is a good reference for other Script authors, if they want to do similar scripts. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Adam1213 Posted February 7, 2006 Share Posted February 7, 2006 To run a autoit script use "C:\Program Files\AutoIt3\beta\AutoIt3.exe" "C:\autoitscript.au3" IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232 Link to comment Share on other sites More sharing options...
ptrex Posted February 8, 2006 Author Share Posted February 8, 2006 @Adam1213 I know that you can run a script like you indicate, but this is not quite the same as running a script AS a SERVICE. This way a script keeps on running even if you have logged off !! Thanks for the feedback anyway. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Adam1213 Posted February 8, 2006 Share Posted February 8, 2006 @Adam1213I know that you can run a script like you indicate, but this is not quite the same as running a script AS a SERVICE.This way a script keeps on running even if you have logged off !!Thanks for the feedback anyway.Not certain on your way. Only had a quick look at it IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232 Link to comment Share on other sites More sharing options...
Fossil Rock Posted April 1, 2006 Share Posted April 1, 2006 How do you use the 'Delete Any Service' feature ? Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
ptrex Posted April 15, 2006 Author Share Posted April 15, 2006 @Fossil Rock Late reply, too late maybe ? The delete Any Service feature, does what it says. It remove the Au3@service from the Windows services list. This is kind if uninstall for the Au3@service, to get rid of it. When you pressed that button, you will see that the "_au3@service" has been removed from the services list. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
rnj Posted May 5, 2006 Share Posted May 5, 2006 Good job dude. Is there any way one can disable a service in the services list using au3 script? [font="Franklin Gothic Medium"]RnJ[/font][font="Franklin Gothic Medium"]Script: AutoIT v3.1.1.124 (beta)[/font][font="Franklin Gothic Medium"]OS: Windows XP/2000[/font] Link to comment Share on other sites More sharing options...
ptrex Posted May 5, 2006 Author Share Posted May 5, 2006 It is possible. this will diable all services that are have MANUAL as start type. Not tested of course. #Include <Constants.au3> Func RemoteReboot() $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = inputbox( "Please enter the name of the computer you want to reboot", "Input" ) $objWMIService = ObjGet("winmgmts:{(RemoteShutdown)}//" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("Select * from Win32_Service where StartMode = 'Manual'") For $objOS in $colItems $objOS.Change( , , , , "Disabled") Next endFunc Success Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Olish Posted September 5, 2006 Share Posted September 5, 2006 Is SrvAny free to use in free programs ? I just tried RunExeSvc and the Admin Tool tells me : "Error 1073 : The specified service is already running" but it is not running. Olivier, from France.Free Wake On LAN script Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2006 Moderators Share Posted September 5, 2006 Is SrvAny free to use in free programs ? I just tried RunExeSvc and the Admin Tool tells me :"Error 1073 : The specified service is already running" but it is not running. RootKit Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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