When I posted my question, I did not know that
- under Windows Scheduler the HOMEDRIVE and HOMEPATH aren't initialized (http://tinyurl.com/9zxbrg8)
- The getpwuid function is not available in Windows ports of Perl (http://tinyurl.com/d56a2mv)
Having the above, I modified /bin/svk file by changing
$ENV{HOME} ||= (
$ENV{HOMEDRIVE} ? catdir(@ENV{qw( HOMEDRIVE HOMEPATH )}) : ''
) || (getpwuid($<))[7];
$ENV{USER} ||= (
(defined &Win32::LoginName) ? Win32::LoginName() : ''
) || $ENV{USERNAME} || (getpwuid($<))[0];
in
$ENV{HOME} ||= (
$ENV{HOMEDRIVE} ? catdir(@ENV{qw( HOMEDRIVE HOMEPATH )}) :
($ENV{USERPROFILE} ? $ENV{USERPROFILE} : '')
);
$ENV{USER} ||= (
(defined &Win32::LoginName) ? Win32::LoginName() : ''
) || $ENV{USERNAME};
and now I'm able to run my batch calling svk as a Windows scheduled task