Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My Documents Path of Machine connected via Remote Desktop

Status
Not open for further replies.

lameid

Programmer
Jan 31, 2001
4,207
0
0
US
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.
 
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
 
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.
 
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
 
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]
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top