Bill Blankenship
Bill Blankenship

Reputation: 3356

How to pass parameters to C# Console Application via task scheduler on win 2k3 server?

I have researched around the web and have found no answer to this simple question. I know on new versions of windows task scheduler that it actually has an option area for parameters but on win2k3 there is no such option.

I am assuming that I just need to pass it as part of the path of the .exe.

Something like. :

"c:\myProgram.exe boolParam=false;stringParam='myVal'"

I am almost positive that this can be done in either the stated way above or something very similar but my syntax is apparently way off and I have tried several variations with no success.

Upvotes: 1

Views: 3936

Answers (2)

Tom Chantler
Tom Chantler

Reputation: 14931

What happens if you just try this?

"c:\myProgram.exe false myVal"

Upvotes: 1

Micah Armantrout
Micah Armantrout

Reputation: 6971

Like this

"c:\myProgram.exe false myVal"

You will need to parse false it will come in as a string not a bool

Upvotes: 3

Related Questions