Jump to content

Recommended Posts

Posted

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!

Posted

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

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

If you looked in the helpfile...

@ComputerName

It'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???

:)

Posted (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 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]

Posted

They are referred to as "macros" in the help file

I 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!
Posted

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]

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
  • Recently Browsing   0 members

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