So I have this unique situation where I need to share particular folders on startup of my Windows Workstation as I have multiple Truecrypt drives that I mount upon login via another batch script that is also an additional tutorial on the blog here at Unknown Tech Solutions. I am going to show you how to use the built in Windows “NET SHARE” command to share out folder/drives to particular windows users. You can do this via the command prompt or place the info in a Windows Batch Script like I am doing.
So I use REM as providing output to the user so inthis case when I click on the batch script I will first get an output stating that:
Creating the Rapture HD Share on Drive W: and grants usernamehere Full Access.
Next we use the command NET SHARE
Then followed by the share name I like to put them in parentheses
NET SHARE “Share Name Here”=”Share Location Here”
If you want to share the whole drive you would just leave it as
NETSHARE”Share Name Here”=Drive Letter Here
For example:
NETSHARE “My Windows Share”=D:/
or
NETSHARE “My Windows Share” =”D:/Shared Files”
Then we use the /GRANT switch to grant a particular user access and which kind of access
For Example
NETSHARE “My Windows Share” =”D:/Shared Files” /GRANT:”Username”,FULL
The aforementioned will grand the user “Username” full access to that particular share
Here is more information on NET SHARE:
http://technet.microsoft.com/en-us/library/bb490712.aspx
Below you will see in the command prompt some of the switches that the article above explained in more detail.
Let me know if you have any other questions.
-Digital Hoarder
Hi terrific blog! Does running a blog like this require a massive amount work?
I have no understanding of coding but I was hoping to start my
own blog soon. Anyway, if you have any ideas or
tips for new blog owners please share. I know
this is off subject but I just had to ask. Cheers!