Reputation: 55
I have an issue with merging (writing) reg values to a single key in bat. The purpose is to use this bat as a logon script so i dont have to keep pushing the script.
This is what I'm trying to get into the reg:
"HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983"
"NAME"="Process Integration Development"
"URL"="<server URL>"
"CLIENT"="100"
"LANGUAGE"="EN"
I have at least 20 or so of these RuntimeConnections that i need in the reg. Each key (BAG_1BC8D0D7E86C3C468F1A2F947453D983) has 3-5 values that need to be added (name, URL, client, language, user).
I have tried:
reg add "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983" /v "NAME" /t "REG_DWORD" /d "Process Integration Development"
that works for the first value but not the second, third, fourth, etc. If I do it for each value it over wrights the previous value. Would I be able to do this with RegIni?
Any ideas, comments, concerns, questions?
Upvotes: 0
Views: 10024
Reputation: 37589
this works here:
@ECHO OFF &SETLOCAL disableDelayedExpansion
reg add "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983"
reg add "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983" /v "NAME" /d "Process Integration Development"
reg add "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983" /v "URL" /d "server URL"
reg add "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983" /v "CLIENT" /d "100" /t REG_DWORD
reg add "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983" /v "LANGUAGE" /d "EN"
session protocol:
C:\Users\Endoro>reg query "HKCU\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983" HKEY_CURRENT_USER\Software\SAP\NWBC\Settings\Pages\RuntimeConnections\BAG_1BC8D0D7E86C3C468F1A2F947453D983 (Default) REG_SZ NAME REG_SZ Process Integration Development URL REG_SZ server URL CLIENT REG_DWORD 0x64 LANGUAGE REG_SZ EN
Upvotes: 1