Jump to content
Sign in to follow this  
datkewlguy

starting a service

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

You also have the NTs command line tool sc:

From the command help description:

SC is a command line program used for communicating with the

NT Service Controller and services.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...