It does not work while it should (sounds pretty normal). Ok have in mind that several enviroment variables does not exist while scheduling ! If you replace
%temp% with c:\temp
%compspec% with cmd
your luck will change.