is it possible to put a switch on the end of my exe at runtime?
i.e. C:\myapp.exe -a
to start it in admin mode and
C:\myapp.exe for normal mode??
if so, how in vb would i pick up the switch?
if anyone has examples i would be grateful
thanx
Printable View
is it possible to put a switch on the end of my exe at runtime?
i.e. C:\myapp.exe -a
to start it in admin mode and
C:\myapp.exe for normal mode??
if so, how in vb would i pick up the switch?
if anyone has examples i would be grateful
thanx
Any command line arguments passed to your VB app are available by examining Command$. If you have a bunch of them you have to parse them yourself. If you want to experiment with this in VB you can go to your 'Project Properties', 'Make' tab, and put something in the 'Command Line Arguments' box - then you can play with Command$ to see what's passed. This feature is for testing command line arguments and doesn't affect your compiled project.
Paul
Use the Command$ function in your startup routine to get any command switches that were passed to the program. Then act based on them.
wonderful.
thanx ppl
Its available as Command or Command$.