Jump to content

Which auto it command would be better?


 Share

Recommended Posts

I just use this to start and stop windows services but i was wondering what would be better to use.

#include <_NTServices.au3>

$Stopstatus = _ServiceStop( _ToInternalServiceName("DVFaxNotifyServer") )
sleep(300)


$Startstatus = _ServiceStart( _ToInternalServiceName("DVFaxNotifyServer") )
sleep(300)

or

#include <process.au3>

$rc = _RunDos("sc stop DVFaxNotifyServer")
$rc = _RunDos("sc start DVFaxNotifyServer")

I was just wondering which snippet of code usually works better. I can add the code here for the #include files if needed.

Edited by win2k
Link to comment
Share on other sites

well this actually is part of a scheduled task so it runs when the user is logged out and just runs in the background, so i will have to check into that at work and test it out on our test servers.

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