Description: |
call:SetRegValue Key Value Data Type |
Script: |
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17.
|
:SetRegValue Key Value Data Type -- sets a registry value
:: -- Key [in] - registry key
:: -- Value [in] - registry value
:: -- Data [in] - (optional) data
:: -- Type [in] - (optional) data type, i.e.: REG_SZ, REG_MULTI_SZ, REG_DWORD_BIG_ENDIAN, REG_DWORD, REG_BINARY, REG_DWORD_LITTLE_ENDIAN, REG_NONE, REG_EXPAND_SZ
:$created 20060101 :$changed 20080219 :$categories Registry
:$source https://www.dostips.com
SETLOCAL
set Key=%~1
set Val=%~2
set Data=%~3
set Type=%~4
if "%Val%" NEQ "" set Val=/v "%Val%"
if "%Data%" NEQ "" set Data=/d "%Data%"
if "%Type%" NEQ "" set Type=/t %Type%
reg add "%Key%" %Val% %Type% %Data% /f>NUL
EXIT /b
|
|