Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Question] - Change My Documents Location

Featured Replies

Hi,

I want to move the own documents folder via script. I only found the registry entry to set the path but after that i have to restart the pc what i dont want.

now i am looking for something which does it like u do it by your own (right mouse click etc) or i change the reg file and and reload the settings for my documents

hope somebody can help me

Try something like this:

;Change location of my documents

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

"Personal" ="C:\\My Data"

"My Video" ="C:\\My Data\\My Video"

"My Music" ="C:\\My Data\\My Music"

"My Pictures"="C:\\My Data\\My Pictures"

"Favorites" ="C:\\My Data\\Favorites"

or if you use Active Directory it can be done with a policy.

What can't be done? The reg hack or changing the location of My Documents? If you mean actually changing the location we've done it where I work. Am I reading something incorrectly?

  • Author

Hi,

of corse, I know these reg entry. but after i ve done this i have to restart the pc.

but when i do this change via right mouse click, properties, location it will change just in the moment. so i think any service well be restarted.

Now I am looking for a script which does this "restart"

Here is a script that will reboot the computer for you

Const LogOff = 0,  Shutdown = 1, Reboot = 2,PowerOff = 8
Dim WMISrv, StrOS, ObjOS
'ForcedLogOff = 0 + 4,ForcedShutdown = 1 + 4, ForcedReboot = 2 + 4,ForcedPowerOff = 8 + 4
strComputer = "."
Set WMISrv = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & strComputer & "\root\cimv2")
Set ObjOS = WMISrv.ExecQuery("Select * from Win32_OperatingSystem")
For Each StrOS in ObjOS
StrOS.Win32Shutdown(Reboot)
Next

  • Author

hi,

i dont mean the reboot in that way. i mean the changes which comes through a reboot. well, when i change the location via mouse it doesnt need a reboot because the service which is responsible for this restarts or refresh

hobe u unterstand me

  • Author

I think the cause is my bad english. so, u dont have to punish yourself out of u like it ;)

But i ll would be glad about a solution :)

Could you describe another way what you're trying to do? I'm a little confused on what you mean about a reboot.

  • Author

ok, i ll try it :)

at the moment when the user clicks on "my documents" he comes to %userprofile%\my documents. but now i want put these folder to his user drive. well, i copy via batch all files to j (user drive) and change the registry. but when he doesnt make a reboot and clicks on my documents he wonders where are all his files because windows hasnt taken over already the new path and then he will call us, everbody will call us!

I know that there exist a gpo for it but we have still problems with it and so we want to solve it by ourself.

I hope u understand me ;)

How about a script that kills explore then restart explorer. So it applies the changes.

strComputer = "."

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'explorer.exe'")

For Each objProcess in colProcessList

objProcess.Terminate()

Next

CreateObject("Wscript.Shell").Popup "Explorer.exe, will restart in 5 seconds", 5, "Re Start Explorer", 0 + 32

CreateObject("Wscript.Shell").Run("explorer.exe")

Post the reg changes you want and I will script it so it applies them and then run the above script.

  • Author

thx,

but i think bother u for free. I check my template and found out after i installed the template that the location is directly changed. well, it seems that it works perfect :)

now i only have to create a verification which checks if the path is already changed and then copy the old files.

but i thank u very much

how did you change the path now? or in other words, how did you achieve that the change was instantly applied without a reboot?

Edited by what3v3r

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.