Whenever i run this code, it actually does its job, it changes the values
Code:
#h::
RegRead, ValorHidden, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden
if ValorHidden = 2
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
else
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
return
However, as said before, the problem seems to be in refreshing the registry but, if after running the script i run regedit and update using F5 manually, then turn to explorer and press F5 the changes are not shown.
On the other and, if, after running the script, i manually go to tools -> folder options.. -> second tab (see or view), i can see that the option has changed and if i close the window (not even need to press accept) then the trick is done.
Conclusion 1: I believe that there is another string or value in the registry that has to be changed in order to get the job done with only refreshing the explorer window.
I made a log of changes in the registry using Regmon, but had no luck...
Conclusion 2: If not the registry then maybe a dll should be "refreshed".
Any ideas?
EDIT: I found this:
http://www.edbott.com/weblog/archives/000692.html
This person wrote the script but with vb, and again i have the same problem. So i think that is something about my configuration or my win (Me, by the way).