Created
August 13, 2024 14:53
-
-
Save realies/9b3e1796f5aa3b3fe654e4aab1c4d678 to your computer and use it in GitHub Desktop.
hd tune pro trial reset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
set "regKey=HKEY_CURRENT_USER\Software\EFD Software\HDTunePro" | |
set "valueName1=Test Parameters 1" | |
set "valueName6=Test Parameters 6" | |
:: Read the value of "Test Parameters 1" | |
for /f "skip=2 tokens=4*" %%A in ('reg query "%regKey%" /v "%valueName1%"') do set "value1=%%B" | |
if not defined value1 ( | |
echo Error: Could not read the value of "%valueName1%" | |
exit /b 1 | |
) | |
:: Update "Test Parameters 6" with the value from "Test Parameters 1" | |
reg add "%regKey%" /v "%valueName6%" /t REG_SZ /d "%value1%" /f | |
if %errorlevel% equ 0 ( | |
echo Successfully updated "%valueName6%" with the value from "%valueName1%" | |
echo New value: %value1% | |
) else ( | |
echo Error: Failed to update "%valueName6%" | |
echo Attempted value: %value1% | |
) | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment