This question already has an answer here:

How to add the below keys using pure batch file?

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server]
"DisplayName"="Server"
"DisplayVersion"="1.2"
"InstallLocation"="C:\\Program Files\\1.2"
"NoModify"=dword:00000001
"Publisher"="ABC"
"UninstallPath"="D:\\test\\Uninstall.bat"
"UninstallString"="D:\\test\\Uninstall.bat"

marked as duplicate by and31415, Tog, Heptite, harrymc windows Jun 1 '14 at 9:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The following lines will add the registry entries you are asking for.

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v DisplayName /t REG_SZ /d Server
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v DisplayVersion /t REG_SZ /d 1.2
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v InstallLocation /t REG_SZ /d C:\\Program Files\\1.2
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v NoModify /t REG_DWORD /d 1
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v Publisher /t REG_SZ /d ABC
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v UninstallPath /t REG_SZ /d D:\\test\\Uninstall.bat
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v UninstallString /t REG_SZ /d D:\\test\\Uninstall.bat

I'm not in front of a Windows machine right now. A .reg file would be most appropriate, as that can automatically add and remove keys. But you want a batch file.

You could do a list of lines of the form reg add .......

The reg command can add a key.

C:\>reg add /? shows for example

REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
  Adds a value (name: MRU, type: REG_MULTI_SZ, data: fax\0mail\0\0)

Not the answer you're looking for? Browse other questions tagged or ask your own question.