We help IT Professionals succeed at work.

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

nummagumma2
nummagumma2 asked
on
412 Views
Last Modified: 2012-05-04
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.
Comment
Watch Question

Commented:
Hi nummagumma2,

To open the current location
%userprofile%/my documents


happy trails
Chad

Author

Commented:
%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.

Commented:
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

Author

Commented:
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.

Commented:
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?

Author

Commented:
I found that on google when I looked too.  Starting to sound like I'm chasing a pink elephant.

Commented:
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

Commented:
Have you tried this?

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

Commented:
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

Author

Commented:
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.

Author

Commented:
I've learned that this is not possible from reading the very very fine print in an intellimirror document on Technet.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.