AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scheduled Tacks and adding command line...

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
DJAnonimo



Joined: 10 Sep 2006
Posts: 146

PostPosted: Mon Apr 07, 2008 12:22 am    Post subject: Scheduled Tacks and adding command line... Reply with quote

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
View user's profile Send private message MSN Messenger
heresy



Joined: 11 Mar 2008
Posts: 291

PostPosted: Mon Apr 07, 2008 1:13 am    Post subject: Reply with quote

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
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 558
Location: MN, USA

PostPosted: Mon Apr 07, 2008 1:26 am    Post subject: Reply with quote

Scheduled Tasks
_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
DJAnonimo



Joined: 10 Sep 2006
Posts: 146

PostPosted: Mon Apr 07, 2008 3:56 pm    Post subject: Reply with quote

ok thanks but anyway i dont know how to create a task schedule with a command line parameter.

any ideas ?
Back to top
View user's profile Send private message MSN Messenger
DJAnonimo



Joined: 10 Sep 2006
Posts: 146

PostPosted: Mon Apr 14, 2008 11:12 pm    Post subject: Reply with quote

Problem solved with a microsoft workaround

http://support.microsoft.com/kb/823093
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group