Command Line Arguments passed to VB.NET exe

boneal06
boneal06 used Ask the Experts™
on
Does anyone know where to pull command line arguments passed to a vb.net exe. The documentation says these are accessbile via the StartArguments Property. But I can't figure out how to access this. Any clues?

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006
Commented:
you could have a look at

http://www.devx.com/dotnet/Article/10115
Imagine that you start the exe with params like that

abc.exe "param"


Dim args() As String
        Dim param() As String

        args = Split(CommandLine, """") 'split by quotation mark
now your param is in the last memeber of args array
        param = Trim(args(UBound(args)))
Most Valuable Expert 2012
Top Expert 2008

Commented:
You can use the Environment.GetCommandLineArgs method.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial