471,066 Members | 924 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Questions about Windows 2003 schedule task

I have a wsh file in with some arguments. It runs fine with a shortcut passed required arguments. When I specified the same command line in schedule task. It seems the wsh cannot read arguments. So I have to use a bath file comes with argument run on the task. Then it works.

On schedule task:
Expand|Select|Wrap|Line Numbers
  1. c:\script\a.wsh a1 a2
the a.wsh won't see all the arguments

Bath file a.bat
Expand|Select|Wrap|Line Numbers
  1. c:\script\a.wsh a1 a2
On task:
Expand|Select|Wrap|Line Numbers
  1. c:\script\a.bat
Then it works fine.
Jul 2 '12 #1
1 2947
I've got the solution. On schedule task should be like:
Expand|Select|Wrap|Line Numbers
  1. wscript c:\script\a.wsf a1 a2
then a.wsf will see all the argument a1 and a2.
Jul 3 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Jerry | last post: by
1 post views Thread by Mullin Yu | last post: by
12 posts views Thread by Onega | last post: by
3 posts views Thread by Harry Simpson | last post: by
7 posts views Thread by =?Utf-8?B?RWRkaWU=?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.