Jump to content

starting a service


Recommended Posts

You just have to use :

#Include <process.au3>
_RunDOS("net start messenger")

("net start" starts every service you want to)

Accordingly "net stop" would stop the service.

Edited by freanir

freanir

Link to comment
Share on other sites

how could i start a service silently (if possible)... anything better than mouseclicks and control sends? for example, messenger service.

<{POST_SNAPBACK}>

With the latest AutoIt beta version you can also do this:

; Start a service
; See also: http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/ishelldispatch2/ishelldispatch2.asp

$oShell=ObjCreate("shell.application")
$oShell.ServiceStart("messenger",false)

Regards,

-Sven

Link to comment
Share on other sites

hello cool SvenP if we want to disable any service then wat to do

this method true = manual service stop

<{POST_SNAPBACK}>

The easiest way to disable a service is by modifying directly in the registry:

RegWrite ( "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Messenger" ,"Start", "REG_DWORD", 4 )

So when you add this line after the 'ServiceStop' request, then the messenger service will not come back.

Regards,

-Sven

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