Add Parameters to a Smart Client (.exe)

U

UnglueD

Hello.

I have an application that reads orders from a database and calls a
webservice to put them into an ERP system. Currently the application
reads all orders but I wish to give it the ability to only load a
certain type of orders.

I was thinking that I could call the application with parameters like
application.exe -p parameter

I need to know how to pick up these parameters in .NET so I can
determine what to load.

Any other ideas are welcome.

Thanks in advance.
 
U

UnglueD

Nevermind. Figured it out. In case you were wondering heres some
sample code.


For i As Integer = 0 To
My.Application.CommandLineArgs.Count - 1
log.Write(My.Application.CommandLineArgs(i))
Next i

will print out (to a log) any arguement passed in like: application.exe
"arguement"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top