The regedit tool can be run from the command-line as detailed in How to add, modify, or delete registry subkeys and values by using a .reg file :
to silently run the .reg file (with the /s switch) from a login script batch file, use the following syntax:
regedit.exe /spath of .reg file
You can also (as noted in Adding key to registry) use reg add to add a key. That answer gives (without clues regarding syntax, etc), this example:
REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
making it not useful. If it had been useful, this would be a duplicate.
From the documentation, and matching it to your key, you might use this command:
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v "p" /t REG_SZ /d "c:\\pp.exe"
That is,
- using
reg add,
- specify as
"HKLM\Software\Microsoft\Windows\CurrentVersion\Run",
- specify the name of the registry key as
"p",
- specify the type as
REG_SZ (a string), and
- specify the data (key's value) as
"c:\\pp.exe"
The "\\" in your key's value looks odd. You might want to check that.