Update current .reg file

Discuss and share scripts and script files...
Post Reply
binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Update current .reg file

Post by binocular222 »

You backed-up settings by exporting to a .reg file, then after a while, you need to update that file by going to regedit > export > overwrite old .reg file.
XY can automate that process by adding this line to PFA:

Code: Select all

"Update|%windir%\regedit.exe" reg>::$Path = trim(trim(gettoken(readfile("<curitem>"),3,"<crlf>"),'[',"L"),']',"R"); Run "reg export ""$Path"" ""<curitem>"" /y"
It simply read the 3rd line from current .reg file to get the registry path > export everything there (include subkeys).

Of course this is crude and rudiment. A more sophisticated way would be reading all the keys but that would involve a bit more lengthy script.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

Post Reply