Sign in to follow this  
Followers 0
Fabiam

Chnage my Documents path

6 posts in this topic

Hallo,

what is the way to change the my Documents path with Autoit?

Thanks

Fabian

Share this post


Link to post
Share on other sites



Fabian,

Do you mean change to the path, or change it from the script?

If you mean change to the path, then something similar to below should be ample (of course, check for a return code to make sure that it was successful):

FileChangeDir (@MyDocumentsDir)

If you want to actually change the path, find where it is stored (I believe it is in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders) and then have a look into the RegRead and RegWrite functions.

Kind Regards,

-Chris

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Fabian,

...

If you want to actually change the path, find where it is stored (I believe it is in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders) and then have a look into the RegRead and RegWrite functions.

Kind Regards,

-Chris

this way must be reboot or relogon,

have anthor way?

Edited by Limpo

Share this post


Link to post
Share on other sites

kind of a bump really; got the same problem;

on logon i'm mapping a drive n:\ and then want to map that to My Documents instead of C:\Documents and Settings\User\My Documents.

Just changing the reg key doesn't take effect until re-logon; is there a way to do this without having to logoff and back on?

Share this post


Link to post
Share on other sites

kind of a bump really; got the same problem;

on logon i'm mapping a drive n:\ and then want to map that to My Documents instead of C:\Documents and Settings\User\My Documents.

Just changing the reg key doesn't take effect until re-logon; is there a way to do this without having to logoff and back on?

Do you have Active Directory? Then you could use a GPO to redirect the local My Documents folder to a mapped network drive. It works well for me.

Share this post


Link to post
Share on other sites

You don`t have to reboot nor re-logon

Just "extract" from

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]

and

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]

Theese 4 keys and their values (like: "C:\\My documents")

"Personal"= ?

"My Pictures"= ?

"My Music"= ?

"My Video"= ?

to a reg file (back up),

change theese 8 paths and the "My documents dir" appears there.

I only don´t know why sometimes you have to wait "some time" till you can

see this dir in the other location when you clic the "My documents shortcut" (unlike

the standard way: Properties .....)

x The values in the registry change in a second.

good day

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0