Jump to content

kill process


Recommended Posts

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

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

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

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 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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...