Sharing a Folder then mapping it through remote desktop

G

Guest

What I am trying to do is create a script of batch file so that when a user
logs in to their computer through Remote Dektop web Client a share is created
on their local My Documents and it is then mapped.

So far I can map a drive using net use H: "\\%clientname%\my documents" if
my documents is shared. However, I am having trouble with the correct syntax
for sharing the folder. I have been trying with the net share command.

If anyone can help, or has a better idea I'm all ears.
 
P

Peter

What I am trying to do is create a script of batch file so that when a
user
logs in to their computer through Remote Dektop web Client a share is created
on their local My Documents and it is then mapped.

So far I can map a drive using net use H: "\\%clientname%\my documents" if
my documents is shared. However, I am having trouble with the correct syntax
for sharing the folder. I have been trying with the net share command.

If anyone can help, or has a better idea I'm all ears.

First you share a folder on host:
NET SHARE sharename=drive:path
Then, on remote machine:
NET USE drive: \\hostname\sharename

Why are you using %clientname% variable?
Why would they need to map in remote desktop to a shared folder on their
remote machine?
 
G

Guest

To clarify. What I am trying to do is make it so that when a user connects to
his work computer from home via vpn and RD his My documents folder gets
mapped so that his local My documents folder shows up on his remote deskto
session. I can do that using the net use command. In order to do that however
it has to be shared, so I would like to know how to share the folder from a
script or batch file.
 
P

Peter

To clarify. What I am trying to do is make it so that when a user connects
to
his work computer from home via vpn and RD his My documents folder gets
mapped so that his local My documents folder shows up on his remote deskto
session. I can do that using the net use command. In order to do that however
it has to be shared, so I would like to know how to share the folder from a
script or batch file.

Can't he just use RDC | Local Resources | Local devices | check "Disk
drives" to "Connect automatically to these local devices when logged on to
the remote computer:" ?
 
G

Guest

A. The user is using Remote Desktop Web so there are no visible options to
the user.

And B. I would prefer to not redirect all the drives, just one shared folder.
 

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