Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Execute program and enter 'string[] args' through windows command prompt

I heard somewhere that it is possible to execute program and enter ‘string[] args’ of main function by cmd in Linuxenter image description here

Is it possible to do the same in Windows? Can I execute program and add this arguments to main function by Windows cmd?
I want to do something like this:
enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Sure, just add the arguments as you would to any other program. Separation characters or quotes are not necessary, unless you need to pass an argument that contains spaces by itself. You don’t normally need to use the start command to launch an application either. So your command line will just be

myprogram arg1 arg2 arg3
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading