Results 1 to 5 of 5

Thread: [RESOLVED] Looking for similar code in vb6

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2011
    Posts
    66

    Resolved [RESOLVED] Looking for similar code in vb6

    Hello. I have cmd file with the following code:
    Code:
    net share d$=d:\ /grant:Administrators,FULL
    The code grants all administrator users in the network domain to access disk D:\ (and also gives a share name of "d$")
    Is there a code in vb6 that can do the same? Thanks!

  2. #2
    Addicted Member
    Join Date
    Mar 2009
    Posts
    244

    Re: Looking for similar code in vb6

    Shell, Shellexecute? or any similar function

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2011
    Posts
    66

    Re: Looking for similar code in vb6

    well I can shell the cmd, I just wanted to be sure if there is a similar code so I can do it with vb6.

  4. #4
    Addicted Member
    Join Date
    Mar 2009
    Posts
    244

    Re: Looking for similar code in vb6

    You can shell the cmd, but you can also just add the commands from the cmd directly using shell/shellexecute.. Or use API calls to do what you want to do, but it won't be as easy as just calling the 'net share' directly...

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2011
    Posts
    66

    Re: Looking for similar code in vb6

    Yes you are right. Thanks for you help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width