Jump to content

window 7 task scheduler


kiboost
 Share

Recommended Posts

Hi,

I would like to check, clean, identify and delete or modify some tasks, adding some task to run some of my script as a task etc, all with an autoit script.

I have never, ever, used task scheduler, I understand how it works but I would need some informations on how to do this by script. An autoit UDF, or some cmd to run/shellexecute etc, any help will ... help !

Thks

Kib

Edited by kiboost

Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79

Link to comment
Share on other sites

hmm I dunno german at all so hard to see if it works, will try to test it.

Anyway, on the cmd version, I can't delete a task as it ask for confirmation and I can't find a switch to not ask this confirmation.

actually I query all task :

$command = 'schtasks /query'

$ReadCmd = Run($command, @ScriptDir, @SW_HIDE, 2)

While 1

$return &= StdoutRead($ReadCmd)

If @error Then ExitLoop

WEnd

then I find taskname that interest me and finnally :

$command = 'schtasks /Delete /TN "'&$taskname&'"'

RunAs($Loginadmin, @ComputerName, $Passadmin, 0, $command, @SystemDir, @SW_HIDE)

but it doesn't delete the task, and when doing it manually in a cmd prompt I have the confirmation asked.

Any idea ?

Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79

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