dos batch scripting command to share a dir and give sharing permissions?

I know 'cacls' changes Security permissions on a directory or file. However I'm having trouble remembering the DOS command that adds a share and changes the sharing permissions. I'd even be ok if it was part of a .vbs script. Thanks.
LVL 11
Forrest BurrisAsked:
Who is Participating?
SteveGTRConnect With a Mentor Commented:
Were you referring to net share?


net share /?

For full help on the command.
Steve KnightConnect With a Mentor IT ConsultancyCommented:
To set the share permissions to anything other than the default you'll need to either run the script on Windows 2003 (as XP and 2000 don't allow permissions changes) or use an alternative.  Rmtshare.exe from the resource kit lets you set share permissions:

There is the syntax and a link to a microsoft ftp server here:

Forrest BurrisAuthor Commented:
Exactly what I was looking for. Thanks.
All Courses

From novice to tech pro — start learning today.