You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
installer: run auto-update maybe a little later than scheduled
When we install the Scheduled Task to trigger `git update` to run, we
did not check that checkbox "Run task as soon as possible after a
scheduled start is missed". But we should.
This is not possible via a command-line option of schtasks.exe,
therefore we have to switch to using an XML file (which would have been
a problem when we still supported Windows XP, but Vista and above accept
that XML with only a few required entries).
Pointed out by Matthew Cheetham.
While at it, we are now also able to ask the Scheduled Task only to be
run if there is a network connection (it is pointless to run it without
internet, right?).
Signed-off-by: Johannes Schindelin <[email protected]>
ifnot Exec(ExpandConstant('{sys}\cmd.exe'),ExpandConstant('/C schtasks /Create /F /SC DAILY /TN "Git for Windows Updater" /TR "'+#39+'{app}\git-bash.exe'+#39+' --hide --no-needs-console --command=cmd\git.exe update --gui" >"'+LogPath+'" 2>"'+ErrPath+'"'),'',SW_HIDE,ewWaitUntilTerminated,Res) or (Res<>0) then
1797
+
ifnot Exec(ExpandConstant('{sys}\cmd.exe'),ExpandConstant('/C schtasks /Create /F /TN "Git for Windows Updater" /XML "'+XMLPath+'" >"'+LogPath+'" 2>"'+ErrPath+'"'),'',SW_HIDE,ewWaitUntilTerminated,Res) or (Res<>0) then
1767
1798
LogError(ExpandConstant('Line {#__LINE__}: Unable to schedule the Git for Windows updater (output: '+ReadFileAsString(LogPath)+', errors: '+ReadFileAsString(ErrPath)+').'));
0 commit comments