Jump to content
Sign in to follow this  
LaurentiuB

Services

Recommended Posts

LaurentiuB

Hi,

How can I made a script for restarting a specific Windows service?

Thank you

Share this post


Link to post
Share on other sites
Andre

runwait('cmd /c net stop <servicename>')

runwait('cmd /c net start <servicename>')

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites
LaurentiuB

thank's

Share this post


Link to post
Share on other sites
Andre

Stupid question, but did u ever read the manual ?


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites
LaurentiuB

How can I add a progres bar ... ?

Share this post


Link to post
Share on other sites
SlimShady

How can I add a progres bar ... ?

<{POST_SNAPBACK}>

Stupid question, but did u ever read the manual ?

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites
zcoacoaz

I don't think he/she did.


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites
LaurentiuB

No, I didn't ... it is true.

This is my script ...

ProgressOn("Update Norton Antivirus", "Please wait ...", "0 percent",0,0,16)

For $i = 10 to 10 step 10

RunWait('cmd /c net stop "Symantec AntiVirus"',@SystemDir,@SW_HIDE)

ProgressSet( $i, $i & " percent")

Next

For $i = 20 to 20 step 10

RunWait('cmd /c net stop "Symantec AntiVirus Definition Watcher"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 30 to 30 step 10

RunWait('cmd /c net stop "Symantec Event Manager"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 40 to 40 step 10

RunWait('cmd /c net stop "Symantec Settings Manager"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 50 to 50 step 10

RunWait('cmd /c net stop "Symantec Event Notification"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 60 to 60 step 10

RunWait('cmd /c net start "Symantec AntiVirus"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 70 to 70 step 10

RunWait('cmd /c net start "Symantec AntiVirus Definition Watcher"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 80 to 80 step 10

RunWait('cmd /c net start "Symantec Event Manager"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 90 to 90 step 10

RunWait('cmd /c net start "Symantec Settings Manager"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

For $i = 100 to 100 step 10

RunWait('cmd /c net start "Symantec Event Notification"',@SystemDir,@SW_HIDE )

ProgressSet( $i, $i & " percent")

Next

ProgressSet(100 , "Done", "Complete")

sleep(500)

ProgressOff()

Share this post


Link to post
Share on other sites
buzz44

I strongly advise you should RTFM after looking at your code :).


qq

Share this post


Link to post
Share on other sites
MHz

ProgressOn("Update Norton Antivirus", "Please wait ...", "0 percent",0,0,16)

$i = 10
RunWait('cmd /c net stop "Symantec AntiVirus"',@SystemDir,@SW_HIDE)
ProgressSet( $i, $i & " percent")

$i = 20
RunWait('cmd /c net stop "Symantec AntiVirus Definition Watcher"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 30
RunWait('cmd /c net stop "Symantec Event Manager"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 40
RunWait('cmd /c net stop "Symantec Settings Manager"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 50
RunWait('cmd /c net stop "Symantec Event Notification"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 60
RunWait('cmd /c net start "Symantec AntiVirus"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 70
RunWait('cmd /c net start "Symantec AntiVirus Definition Watcher"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 80
RunWait('cmd /c net start "Symantec Event Manager"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 90
RunWait('cmd /c net start "Symantec Settings Manager"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")

$i = 100
RunWait('cmd /c net start "Symantec Event Notification"',@SystemDir,@SW_HIDE )
ProgressSet( $i, $i & " percent")


ProgressSet($i , "Done", "Complete")
sleep(500)
ProgressOff()

Share this post


Link to post
Share on other sites
LaurentiuB

I have to improve my english ... I don't know what is RTMF :)

Share this post


Link to post
Share on other sites
MHz

I have to improve my english ... I don't know what is RTMF :)

<{POST_SNAPBACK}>

RTFM = Read The Forum Manual. :D

Share this post


Link to post
Share on other sites
LaurentiuB

Aha ... I promise that I'll RTMF before post a subject

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  

×