Jump to content

Recommended Posts

Posted

Hi, I'm trying to change the download directory to a different disk. I have dealt with.

#RequireAdmin

RegWrite("HKCU\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_EXPAND_SZ", "E:\")

RegWrite("HKCU64\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_EXPAND_SZ", "E:\")

RegWrite returns true, but it does not change. Im use Win 8.1 x64.

 

Posted (edited)

You've Write value here: "HKCU\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders"

I am sure that RegWrite worked very well, and I believe you are wrong. 
No need to open Regedit to check the results when RegWrite return is 1.

but the solution for you:
 

#RequireAdmin
RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_EXPAND_SZ", "E:\")
RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_SZ", "E:\")
;~ RunWait(@ComSpec & " /c taskkill /IM explorer.exe /F && explorer.exe", @SystemDir, @SW_HIDE)
RunWait(@ComSpec & " /c taskkill /IM explorer.exe /F", @SystemDir, @SW_HIDE)
Run(@WindowsDir&"\explorer.exe")

 

Edited by VIP
solutions only for Windows 8.1 and lower.

Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal

Posted
41 minutes ago, VIP said:

You've Write value here: "HKCU\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders"

I am sure that RegWrite worked very well, and I believe you are wrong. 
No need to open Regedit to check the results when RegWrite return is 1.

but the solution for you:
 

#RequireAdmin
RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_EXPAND_SZ", "E:\")
RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_SZ", "E:\")
;~ RunWait(@ComSpec & " /c taskkill /IM explorer.exe /F && explorer.exe", @SystemDir, @SW_HIDE)
RunWait(@ComSpec & " /c taskkill /IM explorer.exe /F", @SystemDir, @SW_HIDE)
Run(@WindowsDir&"\explorer.exe")

 

WTF! Works! As you may restart the pc 100 times and never change -.- this is black magic :) Thx!

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
×
×
  • Create New...