Link to home
Start Free TrialLog in
Avatar of nummagumma2
nummagumma2Flag for United States of America

asked on

Redirected Folders - My Documents... What is the Environment Variable...?

I want to be able to write batch files that will reach the correct location, but can't find the environment variable setting for this.... Someone surely knows.
Avatar of chad
chad

Hi nummagumma2,

To open the current location
%userprofile%/my documents


happy trails
Chad
Avatar of nummagumma2

ASKER

%userprofile% = the profile location of the user.  If that's not redirected, or roaming, it will point to c:\documents and settings\username.

This is not the same location as "My Documents" when My Dox is redirected to a network location.
How are their "My Documents" redirected?

If it is to a folder with their username then use this:

\\servername\%username%\my documents

Or something to that effect
I am looking for the variable that the system uses, not a workaround. =)

I want to deploy this to a bunch of clients with just one script, and my redirection points at a variety of servers.
here is a full list of the variables...
http://kennethhunt.com/archives/000933.html
I can't find anything that will get you any closer... have you looked into VBS?
I found that on google when I looked too.  Starting to sound like I'm chasing a pink elephant.
unfortunately... I hope you get that elephant before it tramples my tulips ;-)
Like I said earlier though... I thought I saw something somewhere that showed a direct path to my docs.
Of course, I can not find it now.
I don't know much about vb
sorry
Have you tried this?

"%HOMEDRIVE%""%HOMEPATH%"\My Documents

If you're using Active Directory, I would suggest the following in lieu of the batch file:

Registry Settings for Folder Redirection in Windows

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q242/5/57.asp&NoWebContent=1

That's how folder redirection is happening.

Now that the folders are redirected, I want to be able to programatically apply something to the location.
I've learned that this is not possible from reading the very very fine print in an intellimirror document on Technet.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial