VB6 Question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: VB6 Question

  1. #1
    Join Date
    Mar 2006
    Posts
    2

    Question VB6 Question

    I have written a small program that executes setacl.exe to set registry key rights for my users, using the credentials of the Local Administrator account and it works well. Now, I want to add more features to it.

    I'm wondering if there is a way to include command line switch functionality in VB6 or VB5, like most DOS utilities use switches, example: Dir *.* /s /w.

    I'm not sure how to compile and write the code for the program to accept switches following the program name, or something like this:
    myapp.exe /dothis /dothat

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Use the Command function, that returns all the options in a String variable (you can parse it using Split)

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Mar 2006
    Posts
    2

    Got it!

    Thanks mstraf. I just spent about a couple of hours till I got it!!!

Similar Threads

  1. semi-dumb question...calling C# from VB6 ?
    By Patrick Steele [MVP] in forum .NET
    Replies: 2
    Last Post: 06-18-2002, 12:46 PM
  2. Replies: 1
    Last Post: 03-11-2002, 09:01 AM
  3. VB6 and Access 2K
    By Bob in forum VB Classic
    Replies: 2
    Last Post: 05-09-2001, 09:46 AM
  4. Replies: 24
    Last Post: 02-09-2001, 12:18 PM
  5. Com Interop and VB6 Collections
    By Esmond Hart in forum .NET
    Replies: 2
    Last Post: 01-29-2001, 06:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center