Jump to content
avechuche

Can't edit reg key

Recommended Posts

avechuche

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.

 

Share this post


Link to post
Share on other sites
avechuche
43 minutes ago, VIP said:

restart explorer!

¿?, That is not the solution, not even the registry value is changed.

Share this post


Link to post
Share on other sites
VIP

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.

Regards,
 

Share this post


Link to post
Share on other sites
avechuche
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!

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.