DRastislav
DRastislav

Reputation: 1882

insert into registry batch file

i would like to add entry to registry with name LangIDEx as REG_DWORD type with hexadecimal value 1b.

I have already:

@echo off
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\folder1"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\folder1\folder2"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\folder1\folder2" /v "LangIDEx"/t REG_DWORD "1b"/f /reg:32
pause

but it doesnt work properly.

Problem with add parameters

Can someone help me?

Upvotes: 0

Views: 137

Answers (1)

MC ND
MC ND

Reputation: 70923

@echo off
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\folder1" /f 
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\folder1\folder2" /f 
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\folder1\folder2" /v "LangIDEx" /t REG_DWORD /d 0x1b /f 
pause

If the intended operations are to be done over the 32bit part of the registry (from a 64bit OS), instead of directly call reg.exe, call %windir%\syswow64\reg.exe, the 32bit version of the program.

Upvotes: 1

Related Questions