Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Creating task (Schtasks) with vbscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2404
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Creating task (Schtasks) with vbscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Creating task (Schtasks) with vbscript - 3/20/2005 7:14:06 PM   
  jide

 

Posts: 5
Score: 0
Joined: 3/15/2005
From:
Status: offline
hello everyone,

I've got a problem with my vbscript calling schtasks.exe :


      

The variables "stime" and "sdate" retrieve a string with this time format 12:00:00 and this date format MM/DD/YYYY. This code don't work.

When I replace these variables like this :


      

my task is created. I don't understand why my task is not created when I use my variables (sdate & stime).

Anyone has an idea?

thx in advance
 
 
Post #: 1
 
 Re: Creating task (Schtasks) with vbscript - 3/20/2005 11:34:33 PM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
How are you setting sdate and stime. I think that you problem may lie there. Post your code.

(in reply to jide)
 
 
Post #: 2
 
 Re: Creating task (Schtasks) with vbscript - 3/21/2005 6:54:27 PM   
  jide

 

Posts: 5
Score: 0
Joined: 3/15/2005
From:
Status: offline
Here is the code :

I retrieve strings with the object ADODB.Record, and I save these strings in a text file, so I think that I couldn't have any problems with the strings stored in "sdate" & "stime"...

Note : this script is called when we request a new meeting in Outlook.


      

(in reply to jide)
 
 
Post #: 3
 
 Re: Creating task (Schtasks) with vbscript - 3/21/2005 11:07:48 PM   
  jide

 

Posts: 5
Score: 0
Joined: 3/15/2005
From:
Status: offline
I've found the problem. I had to pass this time format in parameter : HH:MM:SS but in my stime variable, I had this format : H:MM:SS .

That's working well now

(in reply to jide)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Creating task (Schtasks) with vbscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts