Relative path to user's Documents folder in shortcut?

  • Thread starter Brendan Reynolds
  • Start date
B

Brendan Reynolds

I have a large number of users running an Access app remotely using Terminal
Services. Each user has their own copy of the app in their Documents folder.
I'd like to give each user a shortcut on their Desktop that points to their
own copy of the app in their own Documents folder. There are a lot of these
users and creating all those shortcuts manually is a time-consuming chore.
But if I just copy a shortcut from one user's Desktop to another, then the
shortcut points to the first user's copy of the app, in the first user's
Documents folder. Using system variables like %userprofile% doesn't seem to
work in shortcuts, and anyway there doesn't seem to be one for the Documents
folder. Any suggestions?
 
S

Stefan Hoffmann

hi Brendan,

Brendan said:
I have a large number of users running an Access app remotely using
Terminal Services. Each user has their own copy of the app in their
Documents folder. I'd like to give each user a shortcut on their Desktop
that points to their own copy of the app in their own Documents folder.
I'm using batch files in such cases:

@Echo Off

SetLocal

Set DESTINATION=%USERPROFILE%\AppPath\
Set FILE=AppFile.mdb

Start MSACCESS.EXE "%DESTINATION%%FILE1"

EndLocal



mfG
--> stefan <--
 
B

Brendan Reynolds

Stefan Hoffmann said:
hi Brendan,


I'm using batch files in such cases:

@Echo Off

SetLocal

Set DESTINATION=%USERPROFILE%\AppPath\
Set FILE=AppFile.mdb

Start MSACCESS.EXE "%DESTINATION%%FILE1"

EndLocal



mfG
--> stefan <--


OK, but %userprofile% just gives me "c:\documents and settings\user name", I
need "c:\documents and settings\user name\documents folder" and there
doesn't seem to be a variable for the documents folder?
 
S

Stefan Hoffmann

hi Brendan,

Brendan said:
OK, but %userprofile% just gives me "c:\documents and settings\user
name", I need "c:\documents and settings\user name\documents folder" and
there doesn't seem to be a variable for the documents folder?
I don't store application .mdbs in the documents folder, sometimes I use
%APPDATA% or its own folder.

On the other hand, as you're working on a TS, the name for the documents
folder is the same for all users, so you can hardcode it.

mfG
--> stefan <--
 
B

Brendan Reynolds

Stefan Hoffmann said:
hi Brendan,


I don't store application .mdbs in the documents folder, sometimes I use
%APPDATA% or its own folder.

On the other hand, as you're working on a TS, the name for the documents
folder is the same for all users, so you can hardcode it.

mfG
--> stefan <--


Not necessarily, Stefan. A user can rename their documents folder. Few do,
but it can be done.

Thank you for the help. I may go with this and just deal manually with the
occasional case where a user has renamed their documents folder. It doesn't
happen very often, so I guess I can live with that if I have to.
 
S

Stefan Hoffmann

hi Brendan,

Brendan said:
Not necessarily, Stefan. A user can rename their documents folder. Few
do, but it can be done.
Imho this should not be allowed in a TS environment.

One benefit is the possibility to control the users environments, but
that's philosophy in some way.


mfG
--> stefan <--
 
B

Brendan Reynolds

Stefan Hoffmann said:
hi Brendan,


Imho this should not be allowed in a TS environment.

One benefit is the possibility to control the users environments, but
that's philosophy in some way.


mfG
--> stefan <--


It would sure make my life easier, but it's not my call.

Anyway, the batch file will work for the majority of cases, so thank you
very much for that.
 

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