Tigerweld Posted January 4, 2008 Share Posted January 4, 2008 I have a service I need to kill (sygate firewall) prior to install an app, but I cannot get it to die using the processclose function. Under service I have Display name: Sygate Security Agent Service name: SmcService Path to Excutable: C:\program files\sygate\ssa\smc.exe Help! Link to comment Share on other sites More sharing options...
JustinReno Posted January 4, 2008 Share Posted January 4, 2008 Thats becuase a service is not a process. Use _StopService(). Link to comment Share on other sites More sharing options...
Tigerweld Posted January 4, 2008 Author Share Posted January 4, 2008 Thats becuase a service is not a process. Use _StopService(). I must be doing something wrong. I figured out I need to use the #include "ServiceControl.au3". I have this in the same folder as my projects, does it need to be somewhere else? I tried use _StopService(SmcService) and I get a build error. C:\Documents and Settings\tscott\My Documents\auto it scripts\killProcess.au3(3,24) : ERROR: syntax error _stopService(smcService) ~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\tscott\My Documents\auto it scripts\killProcess.au3(3,24) : ERROR: _StopService() called with wrong number of args. _stopService(smcService) ~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\tscott\My Documents\auto it scripts\ServiceControl.au3(157,49) : REF: definition of _StopService(). Func _StopService($sComputerName, $sServiceName) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\tscott\My Documents\auto it scripts\killProcess.au3 - 2 error(s), 0 warning(s) Link to comment Share on other sites More sharing options...
martin Posted January 4, 2008 Share Posted January 4, 2008 I must be doing something wrong. I figured out I need to use the #include "ServiceControl.au3". I have this in the same folder as my projects, does it need to be somewhere else? I tried use _StopService(SmcService) and I get a build error. C:\Documents and Settings\tscott\My Documents\auto it scripts\killProcess.au3(3,24) : ERROR: syntax error _stopService(smcService) ~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\tscott\My Documents\auto it scripts\killProcess.au3(3,24) : ERROR: _StopService() called with wrong number of args. _stopService(smcService) ~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\tscott\My Documents\auto it scripts\ServiceControl.au3(157,49) : REF: definition of _StopService(). Func _StopService($sComputerName, $sServiceName) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\tscott\My Documents\auto it scripts\killProcess.au3 - 2 error(s), 0 warning(s) Func _StopService($sComputerName, $sServiceName) ?????? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Tigerweld Posted January 4, 2008 Author Share Posted January 4, 2008 awe rats, do I have to put the computer name in the func? It will be used by many computers, do I have to do it for each? Link to comment Share on other sites More sharing options...
JustinReno Posted January 4, 2008 Share Posted January 4, 2008 (edited) If you looked in the helpfile...@ComputerName Edited January 4, 2008 by JustinReno Link to comment Share on other sites More sharing options...
Tigerweld Posted January 4, 2008 Author Share Posted January 4, 2008 If you looked in the helpfile...@ComputerNameIt's official. I'm lost. I looked in the help file, not sure of what I'm looking for. I assume I have to use @computerName and the service name somewhere in the ServiceControl.au3??? Link to comment Share on other sites More sharing options...
SpookMeister Posted January 4, 2008 Share Posted January 4, 2008 (edited) They are referred to as "macros" in the help file When you use a function, like the _StopService() function, you have to supply it with the right arguments. In this case call it like this _StopService(@ComputerName, "smcService") Edited January 4, 2008 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Tigerweld Posted January 4, 2008 Author Share Posted January 4, 2008 They are referred to as "macros" in the help fileI understand the @computerName is a macro. I just want to stop a service. I don't know why it is so difficult. It has been too long a day! Link to comment Share on other sites More sharing options...
SpookMeister Posted January 4, 2008 Share Posted January 4, 2008 oops, I added more info to my earlier post... see if that answers your question. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Tigerweld Posted January 5, 2008 Author Share Posted January 5, 2008 ah, now I understand! That is all I needed. Thanks SpookMeister! sweet! 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