Discussion Locked

Win98SE - share drives by command line

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Require a command line string to set a number of drives to share across a network by batch file under Win98SE.

Command line mapping is not required.

I run a number of encrypted drives which require mounting each morning and sharing for networkaccess. The old right click under explorer is a tad tedious.

Thanks in advance for any help.

Craig

3 replies

by joseph moore

I found this reference in a Technet article, talking about the Resource Kit tool RMTSHARE.EXE:

To Create Shares Remotely
To create or to delete shares on a remote server by using the Rmtshare.exe tool, use a command with the following syntax:rmtshare \\server[\sharename[=path [/printer]]] [/grant [user[:perms ]]] [/remove user][/users:number] [/unlimited] [/remark:"text"] /delete
An explanation of the syntax of the preceding command is:
The "\\server\sharename" syntax refers to boththe server and the share that you can create, inspect, modify, or delete.

The "/grant user:perms" syntax adds the name of a valid user or group on the server that have permissions, or changes the permissions of the user in an access control list. The valid permissions are: r=read, c=change (write), f=full, and n=none. You can type "read", but only the first character is used.

The "/remove user" syntax removes the specific entry for a user. Then, that user inherits permissions (in contrast to "/grant user:none" that denies any access to the user).

The "/users:number" syntax is the number of users that have privileges to the server and share.

The "/delete" syntax deletes the share that are specified by the "\\server\sharename" syntax.

NOTE : If a sharename or path contains spaces, enclose either the sharename or path in quotes, for example: \\server\"with space"="c:\with space".

hope this helps

by r. a. caluste

share.bat

@echo off
net share sharename=drive:path [/users:number | /unlimited] [/remark:"text"] [/cache:manual | automatic | no]

This discussion is closed to new replies.