Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Command Line Arguments passed to VB.NET exe

Posted on 2003-10-27
3
Medium Priority
?
1,907 Views
Last Modified: 2008-03-17
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?

0
Comment
Question by:boneal06
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 1000 total points
ID: 9628430
you could have a look at

http://www.devx.com/dotnet/Article/10115
0
 
LVL 28

Expert Comment

by:iboutchkine
ID: 9628470
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)))
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9628524
You can use the Environment.GetCommandLineArgs method.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

647 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question