2 Replies - 12583 Views - Last Post: 17 January 2008 - 02:54 PM Rate Topic: -----

#1 scalt  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 342
  • Joined: 22-November 07

Start Program from Command Prompt and Pass it Parameters

Posted 17 January 2008 - 01:55 PM

Hi

Is it possible to allow your program to be started from Command Prompt with parameters, and how would you do this if it is?

Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: Start Program from Command Prompt and Pass it Parameters

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 415
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Start Program from Command Prompt and Pass it Parameters

Posted 17 January 2008 - 02:46 PM

Yes you can. You will use the Environment.CommandLine to get the entire command line or the Environment.GetCommandLineArgs property to retrieve just the arguments.

MSDN Environment.CommandLine
MSDN Environment.GetCommandLineArgs
Was This Post Helpful? 1

#3 scalt  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 342
  • Joined: 22-November 07

Re: Start Program from Command Prompt and Pass it Parameters

Posted 17 January 2008 - 02:54 PM

Awesome, thankyou.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1