Jump to content

Autoit executables and Task Scheduler?


 Share

Recommended Posts

Does windows task scheduler and autoit ? I am trying to run a really simple script while logged out of my computer with the tast scheduler and it does all the registry editing fine but wont load up the cmd.exe and run a single line. Any thoughts ?

Link to comment
Share on other sites

Hi,

show your script, please.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Here ya go, Some of the code had to be changed for security reasons, and this script wont work if you run it as it, it would have to have some things changed for whatever services you run and where your domain name is located at in the registry

#include <_NTServices.au3>

HotKeySet("{END}", "Terminate")

SplashTextOn("Service", "Please wait while DVFaxNotifyService has finished being setup")

Dim $Domain_Name
dim $comp_name=@ComputerName
dim $temp
dim $edmmt="\edmmtsadmin";This is just for the log in information
Dim $Stopstatus 
Dim $Startstatus
Const $service= "DVFaxNotifyServer"
Const $pass = "12345"

;Change this variable to What you want the login name to be if you have to pull it from the registry
$temp=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\","Domain")

;This is changing the login name from either what you pulled from the registry or just the computer name
If $temp="" Then
    $Domain_Name=$comp_name
Else 
    $Domain_Name=$temp
endif 

RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DVFaxNotifyServer", "DependOnService")
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DVFaxNotifyServer","DependOnService","REG_MULTI_SZ","RPCSS" & @LF & "Fax" )


Run("cmd.exe")
sleep(2000)

send("sc config " & $service & " start= auto" & " obj= " & $Domain_Name & $edmmt & " password= " & $pass  )   

send("{ENTER}")
sleep(300)

send("exit")

send("{ENTER}")
sleep(300)

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


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


SplashOff()

Func Terminate()
    Exit 0
EndFunc
Edited by win2k
Link to comment
Share on other sites

Hi,

may try _RunDos or have a look at @comspec to change your cmd.exe

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

_RunDos seems to be working perfect while logged out of the windows desktop, Thanks

Welcome!

So long,

Mega

P.S.: That is why I always tell the people to show there code. :whistle:

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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