heise Security IT security news and services at heise Security UK

Offline Update

Home-made Service Pack

Autorun for latest ctupdate 22 May 2008 13:10

I was looking to have the ability to have UpdateGenerator.exe just
start downloading with the options from the ini when it was started
(preparing to have it just called from a the windows task scheduler). 
The patch (see end of post) will check for a new ini value in the
Miscellaneous section: autorun=Enabled

If it is found it will simulate the start button already being
clicked. 

If anyone has a better way to do this, it would be most appreciated. 

Thanks, 

     wrj

diff UpdateGenerator.au3 UpdateGenerator-wrj.au3

54a55
> Dim Const $misc_token_autorun   = "autorun"
81a83
> Dim $GetMsgResult
2554a2557,2561
> ; Autorun on startup. 
> If IniRead($inifilename, $ini_section_misc, $misc_token_autorun, "") = $enabled Then 
> $GetMsgResult=$btn_start
> EndIf

2569c2576
<   Switch GUIGetMsg()
---
>   Switch $GetMsgResult
2601a2609,2611
>   ;Fix for the error message looping if autorun is enabled. 
>   ;Reset the environment to something the error handling is expecting. Otherwise it will just continue restarting the download. 
>    $GetMsgResult=GUIGetMsg()
3831a3842
>   $GetMsgResult=GUIGetMsg()

Red times indicate new postings.