kiboost Posted September 17, 2011 Share Posted September 17, 2011 (edited) 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 September 17, 2011 by kiboost Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 19, 2011 Share Posted September 19, 2011 SchTaksks.exe Use it with Run(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kiboost Posted September 19, 2011 Author Share Posted September 19, 2011 Thanks, was looking for an integrated UDF, there is one on the forum but not optimal. Will use the old cmd method ;-) Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
KaFu Posted September 19, 2011 Share Posted September 19, 2011 There is some code related to the COM object "Schedule.Service" on the German Autoit forum: http://autoit.de/index.php?page=Thread&threadID=25383 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
kiboost Posted September 19, 2011 Author Share Posted September 19, 2011 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 More sharing options...
kiboost Posted September 19, 2011 Author Share Posted September 19, 2011 ok found : $command = 'schtasks /Delete /TN "'&$taskname&'" /F' Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
spudw2k Posted September 19, 2011 Share Posted September 19, 2011 This may be of use to you. It is the start of a GUI for schtasks Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now