INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

My Documents Path of Machine connected via Remote Desktop

My Documents Path of Machine connected via Remote Desktop

(OP)
Anyone know how to find the my documents path (or desktop) of the machine whose session is running Access on a Terminal Server via Remote Desktop?

I have not had a chance to dig deep on this one. I am hoping to get lucky and someone has blazed the trail already. I know there is a common UNC way to get to the connected computer but that doesn't help me with the user directory.

RE: My Documents Path of Machine connected via Remote Desktop

I would not think it possible to gain access to the client machine who has RDP'd in, that seems a breach of security to me.

I can access the resources on the server I RDP to, but it shouldn't work the other way round.

However, under the RDP settings there is a 'Local Resources' tab and a section 'Local Devices & Resources', with a 'more' button.

You can use this to attach local client drives (such as C:) to the RDP Terminal Server session, and then they are available from the host Terminal Server and therefor the MS Access application.

You'll need to play with the UNC and also need to know the remote users computer name as that's how it gets mapped to the host.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music

RE: My Documents Path of Machine connected via Remote Desktop

(OP)
If the user is presented with an office open file dialog they can browse server locations and local locations. I am trying to avoid letting them save on the server and gain access to explorer like functions in the dialog by using a fixed path. Hence the question, how do I find the attached client my documents folder?

I am expecting code or special environment variable internal to TS.

RE: My Documents Path of Machine connected via Remote Desktop

for Vista+ it's

<system drive>\Users\(User_Name)\Documents

The simplest way I see would be to map it as mentioned via a resource in the RDP session.

1. On the user's local machine share the documents folder to themselves only.

2. Map it to a drive letter. E.G.

CODE

net use z: \\<User's Computer Name>\Users\<user name>\Documents 

3. Add it as a resource in the RDP session settings.

Then your Access code can use the fixed path that maps directly to their local documents.









"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music

RE: My Documents Path of Machine connected via Remote Desktop

(OP)
Just poking around with the file browse, this is generic at least on my windows 7 machine... still need remote user if able to make other assumptions. Going for no user input here.

[Code]
\\tsclient\C\Users\<username>\Documents\
[\Code]

RE: My Documents Path of Machine connected via Remote Desktop

In my RDP session I can only see under 'Network/tsclient', resources mapped via the section I mentioned, for example I have a z: drive I use to transfer files between RDP host server and my client machine.

Even local shares cannot be seen from the tsclient network location, regardless of whether the server I connect to is on the same domain or not.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close