Open rfay opened 7 years ago
I wonder if schtasks is returning non-zero even when it succeeds 🤔
I spent a little time with this but didn't sort it out yet.
It looks to me like schtasks works just fine with the xmlfile and everything else it has created, which makes sense because it all works:
schtasks /Create /Tn junker999 /xml f-117628-3488-8hy2cy.4z11owp14i
SUCCESS: The scheduled task "junker999" has successfully been created.
C:\Users\rfay\AppData\Local\Temp>echo %ERRORLEVEL%
0
I suspect that runAsAdministrator() just isn't up to the task of capturing the return value of a windows command execution.
The (untouched) generated xml, which works fine with manual invocation as above, is at https://gist.github.com/rfay/1b669521f7b0bc9e010ccff24b0844b8
However, just for posterity (don't think these are the problem) some links on schtasks returns:
I tried running surf-install, and it claimed it failed:
However, when I look at the task scheduler, it seems to have been inserted just fine, and when I restart/login the task runs.
Windows 10, in administrative cmd window. surf 1.0.4
BTW, I've basically had great success with surf. Thank you! We're able to use it for one-off configurations that circleci and appveyor just can't do for us.