I tried this code, I haven't error on compile, but if I open scheduler I can't see my task.
I need to use it on Windows 7 and over...Var /Global tempVar
StrCpy $tempVar $\"'$INSTDIR\$2\${MAIN_APP_EXE}'$\"
ExpandEnvStrings $0 %COMSPEC%
nsExec::ExecToStack '"$0" /C if 1==1 SchTasks /Create /SC ONLOGON /TN "ATask" /TR "$tempVar -j 1 -t 30 min"'
Could you help me, please?