473,320 Members | 2,164 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,320 software developers and data experts.

Create a shellable program

When you run a program like ip config from the command line you are
given the option to use switches like /all /renew ....

In vb.net how do you create a shellable application with switch options
like this?

Peter

Nov 21 '05 #1
3 1028
From help file for Sub Main

Function Main(ByVal CmdArgs() As String) As Integer
Dim ArgNum As Integer ' Index of individual command-line argument.
If CmdArgs.Length > 0 Then ' See if there are any arguments.
For ArgNum = 0 To UBound(CmdArgs)
' Examine CmdArgs(ArgNum) for settings you need to handle.
Next ArgNum
End If
MsgBox("Hello World!") ' Display message on computer screen.
Return 0 ' Zero usually means successful completion.
End Function

<pe***@mclinn.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
When you run a program like ip config from the command line you are
given the option to use switches like /all /renew ....

In vb.net how do you create a shellable application with switch options
like this?

Peter

Nov 21 '05 #2
dim x as string
x = Microsoft.VisualBasic.Command 'returns the portion of the command
line after the executable name.

<pe***@mclinn.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
When you run a program like ip config from the command line you are
given the option to use switches like /all /renew ....

In vb.net how do you create a shellable application with switch options
like this?

Peter

Nov 21 '05 #3
<pe***@mclinn.com> schrieb:
When you run a program like ip config from the command line you are
given the option to use switches like /all /renew ....

In vb.net how do you create a shellable application with switch options
like this?


\\\
Public Module Program
Public Sub Main(ByVal Args() As String)
If Args.Length > 0 Then

' 'Args' is a string array that contains the command line
' parameters' values.
End If
End Sub
End Module
///

In the project properties, select 'Sub Main' as startup object.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4

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

Similar topics

7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
3
by: equip200 | last post by:
I have a third party program that has the ability to control my program trough ActiveX/COM. My program is built in c#? What would I need to do to have the third party program connect to my...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
37
by: Steven Bethard | last post by:
The PEP below should be mostly self explanatory. I'll try to keep the most updated versions available at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.