We help IT Professionals succeed at work.

Command line arguments

tguillor
tguillor asked
on
470 Views
Last Modified: 2010-04-16
VS 2005

We have a Windows app we inherited that has the following logic:

It's meant to be run from the console, with command line args.  If no args are entered, then a form opens that allows the user to input the args.  Since this app runs as a scheduled job, we'd like to be able to include the args in the job.

No matter what we enter at the command prompt, the form opens.  It appears to be ignoring the args.

Is there anything we need to do within C# to signal the compiled version that args are expected?

Comment
Watch Question

Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009

Commented:
Show us how you are reading the args in and processing them...
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Small correction: you cam leave two lines

           Application.EnableVisualStyles();
           Application.SetCompatibleTextRenderingDefault(false);
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.