-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.

2
  • Have you looked at learn.microsoft.com/en-us/dotnet/visual-basic/reference/… Commented Aug 3, 2017 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? Commented Aug 3, 2017 at 14:02

1 Answer 1

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%"
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.