Granting share access permissions from DOS prompt

D

dev_prog

Hi Gurus,
I was wondering if anyone knows the DOS command to grant/revoke file
sharing permissions of a shared folder.
Basically, I would like to share my USB key on the work network so
that I can access it on any work PC. Every morning, after plugging the
key, it takes (say) drive X:. I then share this as X$ and specify
permissions to my account following a sequence of right-clicks and
entering the names.
I'm hoping if this can be done by a DOS batch file or a VBS script, so
one can do the whole lot by just double-clicking this icon.
In regards to the sharing, it can be done using the NET SHARE dos
command but I don't know how to specify the access permissions as a
dos command.
If anyone has ever touched this area, it will be appreciated to
receive your recommended solution.
Cheers,

Dev
 
P

Pegasus \(MVP\)

Hi Gurus,
I was wondering if anyone knows the DOS command to grant/revoke file
sharing permissions of a shared folder.
Basically, I would like to share my USB key on the work network so
that I can access it on any work PC. Every morning, after plugging the
key, it takes (say) drive X:. I then share this as X$ and specify
permissions to my account following a sequence of right-clicks and
entering the names.
I'm hoping if this can be done by a DOS batch file or a VBS script, so
one can do the whole lot by just double-clicking this icon.
In regards to the sharing, it can be done using the NET SHARE dos
command but I don't know how to specify the access permissions as a
dos command.
If anyone has ever touched this area, it will be appreciated to
receive your recommended solution.
Cheers,

Dev

Current usage says that DOS is an operating system. It does not
exist under Windows XP. Your aim is to change permissions
with a "command line".

To make drive X: available to other users, share it as "USBKey"
instead of X$.

AFAIK, the command "net share" will set permissions only on
a Windows 2003 server but not under WinXP. Instead of setting
***share*** permissions, consider setting ***NTFS***
permissions. They can be set with cacls.exe. This implies that
you convert your USBKey from FAT to NTFS, using convert.exe.

You need to set NTFS permissions once only. They become
part of the file system.

Post again if you require more detailed instructions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top