- reg add this: reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoActiveDesktop" /t REG_DWORD /d "00000001" /f becomes: regfree -AddKey "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Set REG_DWORD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoActiveDesktop"="00000001" - reg becomes regfree - add becomes -AddKey - /v becomes -Set - /t REG_DWORD becomes REG_DWORD before the value not after - /d becomes = - /f is removed - And the whole path must be re-entered with the -Set unless you assume the key already exists and so don't simultanrously use -AddKey IS THERE EVER GOING TO BE AN INSTANCE WHERE A KEY ITSELF WON'T ALREADY EXIST? with Windows maybe not, with apps yes - Microsoft's Reg sets a default value using a value name of "". DGT's Reg requires that you instead "enclose the path name in quotes and specify a trailing blank (e.g. "\path\ ")" so, after our search and replace, value name will be blank [is this ok with the \# numbering?] so a subsequent search and replace wants to for each line in the previous format using '""' a '\ ' should be manually added to the end of "key\value-name" "Another special case occurs when "\" is followed by a single digit in the range of 1 through 9. In this case the tagged match word found by the Find expression is used in the resulting replacement text. If a tagged match word for that tag number was not defined, or if the tagged match word doesn't match anything, then nothing is output. The tagged match words can be used in any order and can be repeated any number of times." We have these occurences in Windows Configuration of this value: "HKLM\Software\Classes\Folder\Shell\Command Prompt\command" /v "" /t REG_EXPAND_SZ /d "Cmd.exe /K pushd %1" "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon" /v "" /t REG_EXPAND_SZ /d "%SYSTEMROOT%\system32\shell32.dll,18" "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon" /v "" /t REG_EXPAND_SZ /d "%SYSTEMROOT%\explorer.exe,10" "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon" /v "" /t REG_EXPAND_SZ /d "%SYSTEMROOT%\system32\shell32.dll,17" "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon" /v "" /t REG_EXPAND_SZ /d "%SYSTEMROOT%\explorer.exe,0" "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{645FF040-5081-101B-9F08-00AA002F954E}" /v "" /t REG_SZ /d "Recycle Bin" and realplayer-config.bat uses them and when setting default HTML editor in file-assoc.bat These will be the regfree paths ending in \" - some commands didn't specify REG_SZ so these need converting using the following: reg add "key" /v "value-name" /d "value" /f reg add "\1" /v "\2" /t REG_SZ /d "\3" /f which translates to: reg\sadd\s"{.*}"\s/v\s"{.*}"\s/d\s"{.*}"\s/f reg\sadd\s"\1"\s/v\s"\2"\s/t\sREG_SZ\s/d\s"\3"\s/f - reg add "key" /v "value-name" /t value-type /d "value" /f becomes regfree -AddKey "key" -Set value-type "key\value-name" = "value" or regfree -Set value-type "key\value-name" = "value" the whole path must be re-entered with the '-Set' unless you assume the key already exists and so don't simultanrously use '-AddKey' - Replace with Patterns Find:

{.*}

Replace with:

\1

- to find, we look for this: reg add "" /v "" /t REG_EXPAND_SZ /d "Cmd.exe /K pushd %1" /f reg add "key" /v "value-name" /t value-type /d "value" /f 1 2 3 4 which translates to this: reg\sadd\s"{.*}"\s/v\s"{.*}"\s/t\s{.*}\s/d\s"{.*}"\s/f and replace with this: regfree -quiet -AddKey "key" -Set value-type "key\value-name" = "value" which transates to this: regfree\s-AddKey\s"\1"\s-Set\s\3\s"\1\\\2"\s=\s"\4" or regfree -Set value-type "key\value-name" = "value" ----------------------------------------------------------------------------------- - reg query in Driver Configuration this is used: reg query "HKLM\SYSTEM\CurrentControlSet\Services\Ati HotKey Poller" /v "Start" | findstr 0x2 which translates to: reg\squery\s"{.*}"\s/v\s"{.*}"\s\|\sfindstr\s0x{.*} which becomes: regfree -ListValue "HKLM\SYSTEM\CurrentControlSet\Services\Ati HotKey Poller\Start" | findstr 2 which translates to: regfree\s-ListValue\s"\1\\\2"\s\|\sfindstr\s\3 - regfree translates the value to '2' or '3', reg leaves it as '0x2' or '0x3' ----------------------------------------------------------------------------------- - deleting - values using reg we do this: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\ThemeManager" /v "ColorName" /f reg delete "key" /v "value" /f which translates to this: reg\sdelete\s"{.*}"\s/v\s"{.*}"\s/f and replace with this: regfree -quiet -DeleteValue "\1\\\2" which transates to this: regfree\s-quiet\s-DeleteValue\s"\1\\\2" - keys / trees we have these instances: - reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{645FF040-5081-101B-9F08-00AA002F954E}" /f - reg delete "HKCU\Software\EF Notetab" /f search: reg delete "key" /f which translates to this: reg\sdelete\s"{.*}"\s/f replace: regfree -quiet -DeleteTree "\1" which translates to this: regfree\s-quiet\s-DeleteTree\s"\1" ----------------------------------------------------------------------------------- use of \ in key names is dealt with differently in regfree than reg we use it here: - 'Add 'Favorites' to RegEdit so can easily see most programs that are automatically loading on startup and login' we use the '_' character in place of '\', resulting in this: '-ValueDeLiMiter _' ----------------------------------------------------------------------------------- As regfree doesn't add more than one level of 'directory', where a structure doesn't already exist it needs to be added level by level. this is a manual step that can't be automated. The advantage with this is that if configuration is applied when the application/feature isn't already installed then the redundant registry structure and settings won't be made. TWEAK requires this in the following places: echo For more extreme security, remove the ability to change the feature either way done fix: regfree -quiet -AddKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" regfree -quiet -AddKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Set REG_DWORD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate" = "00000001" echo Add an entry to Windows Explorer's right-click menu to go to the command-line at that point... done fix: regfree -quiet -AddKey "HKLM\Software\Classes\Folder\Shell\Command Prompt" regfree -quiet -AddKey "HKLM\Software\Classes\Folder\Shell\Command Prompt\command" -Set REG_EXPAND_SZ "HKLM\Software\Classes\Folder\Shell\Command Prompt\command\ " = "Cmd.exe /K pushd %1" echo Change My Network Places icon done fix: regfree -quiet -AddKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}" regfree -quiet -AddKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon" -Set REG_EXPAND_SZ "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon\ " = "%SYSTEMROOT%\system32\shell32.dll,18" echo Change My Computer icon done fix: regfree -quiet -AddKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" regfree -quiet -AddKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon" -Set REG_EXPAND_SZ "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon\ " = "%SYSTEMROOT%\explorer.exe,10" echo Always show Internet Explorer Radio bar - off done fix: regfree -quiet -AddKey "HKCU\Software\Microsoft\MediaPlayer\Radio" regfree -quiet -AddKey "HKCU\Software\Microsoft\MediaPlayer\Radio\Settings" -Set REG_SZ "HKCU\Software\Microsoft\MediaPlayer\Radio\Settings\AlwaysShowRadio" = "No" 'Windows Configuration' - 'Add 'Favorites' to RegEdit...' regfree -quiet -AddKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites" 'Zinf Configuration' - 'Configure Zinf 2.2 for %USERNAME%' 'Zinf Configuration' - 'Set %USERNAME%'s Zinf 2.2 Save Music Folder to F:\%username%\' 'Zinf Configuration' - 'Set %USERNAME%'s Zinf 2.2 Save Music Folder to H:\' ----------------------------------------------------------------------------------- Issues ------ - the accompanying document explaining how to use regfree doesn't claim it supports a value type of REG_BINARY where-as it does and the instructions available with 'reg/?' do claim this is possible - regfree's documentation claims -deletekey requires no values to be present, but it will delete if default values present and set - regfree's documentation doesn't mention that the '-ValueDeLiMiter' char cannot be atleast '-' or ';' - Regfree can't enter the '"' character into the registry - use of the " character in values: set 'Default HTML Editor': reg add "HKCU\Software\Microsoft\Internet Explorer\Default HTML Editor\shell\edit\command" /v "" /t REG_SZ /d "%PROGRAMFILES%\Mozilla\mozilla.exe -editor ""%%1""" /f enters this into the registry: C:\Program Files\Mozilla\mozilla.exe -editor "%1" but regfree uses the " character to seperate its input - add utils to path: "Error replacing the path - 'C:\program files\utils' not added but didn't it add it anyway? THIS IS POTENTIALLY AN OUTSTANDING ISSUE!