how to retrieve the EXE Parameters from within the application
Dear all,
i have a small exe project that does a small job. It is supposed to recieve a single paramter on runtime in order to tag the function.
i will can it from within another program as following :
VB Code:
process.start("printinvoice.exe Username")
from within the project PrintInvoice i need to get the value of the passed parameter at startup . How can i do this
thx in advance
Re: how to retrieve the EXE Parameters from within the application
any answers ??? :confused:
Re: how to retrieve the EXE Parameters from within the application
why doesn't anyone ever state what version of .NET they use :(
Re: how to retrieve the EXE Parameters from within the application
:blush:
VS 2003 , Sorry kleinma no one is old enough for Doing mistakes
rgds
Re: how to retrieve the EXE Parameters from within the application
In 2003, you can get your command line args using code like this
VB Code:
For Each S As String In Environment.GetCommandLineArgs()
MessageBox.Show(S)
Next
keep in mind that in 2003, the first command line arg (argument at position 0 of the array) is always the full path to the exe that is running.
Re: how to retrieve the EXE Parameters from within the application
:D i am using VS2003 :D
Thank you very much for your kind answer
i will give it a go now
Re: how to retrieve the EXE Parameters from within the application
How do you get command line parameters in VB 6.0?
Re: how to retrieve the EXE Parameters from within the application
i think u better post this question in the classical vb6 section
Thank y ou
Re: how to retrieve the EXE Parameters from within the application
in VB6 you can see the command line arguments in a string with this
You have to parse it yourself.
Re: how to retrieve the EXE Parameters from within the application
thanks. got that covered.