locked
.exe with Command Line Arguments RRS feed

  • Question

  • I added command arguments to my program. Now the .exe in the /build folder wont run.

    Do I need to add some kind of shortcut function to show it where the .txt file is at for the arguments?

    Wednesday, October 20, 2010 4:49 AM

Answers

  • You could either create a shortcut to specify the arguments for the EXE or you could create a batch file that calls the EXE with its command line arguments.


    «_Superman_»
    Microsoft MVP (Visual C++)
    • Marked as answer by NickBMarine Wednesday, October 20, 2010 6:11 PM
    Wednesday, October 20, 2010 6:44 AM

All replies

  • You could either create a shortcut to specify the arguments for the EXE or you could create a batch file that calls the EXE with its command line arguments.


    «_Superman_»
    Microsoft MVP (Visual C++)
    • Marked as answer by NickBMarine Wednesday, October 20, 2010 6:11 PM
    Wednesday, October 20, 2010 6:44 AM
  • You could either create a shortcut to specify the arguments for the EXE or you could create a batch file that calls the EXE with its command line arguments.


    «_Superman_»
    Microsoft MVP (Visual C++)
    Cool, How would I do that?
    Wednesday, October 20, 2010 1:30 PM
  • If your program needs command arguments for debugging from the IDE, you can add the arguments under Project properties, Debugging, Command arguments
    Wednesday, October 20, 2010 1:37 PM
  • Building it is not the problem. The problem is running the .exe in the build folder so that way when I want to demonstrate my program I don't have to rebuild it.

     

    How would I add command arguments to a shortcut to the .exe or use a batch file?

    Wednesday, October 20, 2010 5:32 PM
  • First I suggest you review hgn's suggestion.  It provides you with a way to add command line arguments when the debugger starts the program.

    If you prefer to use a shortcut: Right click on the exe file and select Create Shortcut.  Then right click on the shortcut and add your arguments in the shortcut's properties.

    Wednesday, October 20, 2010 5:51 PM