-4

I have a VB.net console application with command line arguments.
Like ("-Arg1=Value1 -Arg2=Value2 -Arg3="Value 3")
this i'm passing arguments from project properties -> Debug ->Command line arguments.

My plan is to run this console application from batch(.bat) file. I can able to run like this.

@echo off

D:\Project\Bin\Debug\abc.exe %* -Arg1=Value1 -Arg2=Value2 -Arg3="Value 3"

But my expectation is while running console application it need to ask values for

-Arg1, -Arg2 & -Arg3

I need to pass values at run time.

  • Have you looked at https://learn.microsoft.com/en-us/dotnet/visual-basic/reference/command-line-compiler/how-to-invoke-the-command-line-compiler –  Aug 03 '17 at 13:57
  • Unable to reproduce the problem. These command-line arguments are being passed to my sample application from a batch file as expected. Can you elaborate on how you're able to reproduce the problem? – David Aug 03 '17 at 14:02

1 Answers1

0
@echo off
Set /P "Value1=Enter Arg1 :"
Set /P "Value2=Enter Arg2 :"
Set /P "Value3=Enter Arg3 :"
D:\Project\Bin\Debug\abc.exe %* -Arg1=%Value1% -Arg2=%Value2% -Arg3="%Value3%"