| View previous topic :: View next topic |
| Author |
Message |
DJAnonimo
Joined: 10 Sep 2006 Posts: 146
|
Posted: Mon Apr 07, 2008 12:22 am Post subject: Scheduled Tacks and adding command line... |
|
|
Hi,
i got a problem, i dont know how to add in Scheduled Tasks to start an application with command line parameter...
the code below wont work because it adds fullpath and command line parameter without quote marks which are needed.
Now:
| Code: | | C:\Documents and Settings\DJ_Anonimo\Desktop\New AutoHotkey Script (2).exe 1 |
Correct: | Code: | | "C:\Documents and Settings\DJ_Anonimo\Desktop\New AutoHotkey Script (2).exe" 1 |
so the command line parameter is not quoted with quote marks and thats correct.
| Code: | if 1 = 1
{
Msgbox Command line
ExitApp
}
Sch_Time := "00:00:00"
SCh_UserName := "A"
SCh_Password := "A"
SCh_Domain := A_ComputerName
ScriptFullPathWithCmdline = %A_ScriptFullPath% 1
Task1 = SCHTASKS.exe /Create /SC weekly /D MON,TUE,WED,THU,FRI /TN ScheduledTask /ST 00:00:00 /TR "%ScriptFullPathWithCmdline%" /RU
%SCh_Domain%\%SCh_UserName% /RP %SCh_Password%
Run, %Task1% |
Anyone have some experiences with WinXp "Scheduled Tasks" ?
Thanks |
|
| Back to top |
|
 |
heresy
Joined: 11 Mar 2008 Posts: 291
|
Posted: Mon Apr 07, 2008 1:13 am Post subject: |
|
|
when perform command line tools.
use %Comspec% instead of perform directly
| Code: | Run, %ComSpec% /c %Task1%
/c for autoclose
/k for keep window |
|
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 558 Location: MN, USA
|
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 146
|
Posted: Mon Apr 07, 2008 3:56 pm Post subject: |
|
|
ok thanks but anyway i dont know how to create a task schedule with a command line parameter.
any ideas ? |
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 146
|
|
| Back to top |
|
 |
|