473,395 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Start Application with External Arguments

Hi All,

I want get arguments/parameters in a vb.net Console/Windows application.

e.g. c:\MyApp.exe Parm1 Parm2

Please tell me if it is available. I cannot found in any help or msdn.

Quickfox49
Nov 20 '05 #1
2 1843
There ya go !

Module Module1

Sub Main(ByVal args() As String)

Dim i As Int32

For i = 0 To args.Length - 1

Console.WriteLine(args(i))

Next

Console.ReadLine()

End Sub

End Module
Regards - OHM

news.microsoft.com wrote:
Hi All,

I want get arguments/parameters in a vb.net Console/Windows
application.

e.g. c:\MyApp.exe Parm1 Parm2

Please tell me if it is available. I cannot found in any help or
msdn.

Quickfox49


Regards - OHM# On**********@BTInternet.com
Nov 20 '05 #2
"news.microsoft.com" <qu********@hotmail.com> schrieb

I want get arguments/parameters in a vb.net Console/Windows
application.

e.g. c:\MyApp.exe Parm1 Parm2

Please tell me if it is available. I cannot found in any help or
msdn.


shared sub Main(Args as string())
console.writeline string.join(vbcrlf, Args)
end sub

or: System.Environment.GetCommandLineArgs
or: Microsoft.VisualBasic.Interaction.Command

For testing purposes in the IDE, you can set the arguments in the project
properties: Configuration properties -> Debug: Command line arguments
[____________________]
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Yu | last post by:
Hi, anybody knows how to use debug window to start console application program with input arguments. In DOS window I can start my application program likes MQGET QTT1 DAVID.LOCAL which input...
6
by: Dmitri Shvetsov | last post by:
Hi, Can I start an external process from the Web Service? I'm using a code, compiler keeps silence, compiles ok and starts the project. When I trace in Debugger it doesn't start an external...
0
by: Robert Wehofer | last post by:
Hello! I'm writing an ASP.NET application using VB.Net, which should start an external console application. How can I realise that? The console application needs some arguments and ASP.Net...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
3
by: SR | last post by:
I have a requirement from a customer to run some command line applications from a service. I have most of my service coded and I've come across an issue with the important part of the application,...
1
by: cvairetti | last post by:
Hi, I just write an application in C# that show an interface with five button, each button starts an external application that it comes in front of the main C# application with focus on. When the...
0
by: HeroOfSpielburg | last post by:
Hello, I'm new to the realm of .NET application creation, so please forgive my ignorance. I have been tasked with debugging a problem that arises with using a DLL that contains managed and...
0
by: mbailey | last post by:
I am new to VB.Net (Visual Studio 2005) and am encountering a problem calling an external exe file with two parameters. If I use the Run dialog box of the Windows Start menu and enter: "C:\Program...
1
by: rottmanj | last post by:
I am working on an application that requires me to use an external application to pull data from a odbc proxy. One issue that I have run into is trying to figure out how to pass data from my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.