|
-
Jan 9th, 2002, 09:39 AM
#1
Thread Starter
Hyperactive Member
run time switches
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
"...They even have the internet on computers..." :- Homer Simpson
"Second Place is First Looser" :- No Fear
-
Jan 9th, 2002, 09:41 AM
#2
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
-
Jan 9th, 2002, 09:42 AM
#3
Frenzied Member
Use the Command$ function in your startup routine to get any command switches that were passed to the program. Then act based on them.
-
Jan 9th, 2002, 09:43 AM
#4
Thread Starter
Hyperactive Member
"...They even have the internet on computers..." :- Homer Simpson
"Second Place is First Looser" :- No Fear
-
Jan 9th, 2002, 09:44 AM
#5
Black Cat
Its available as Command or Command$.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|