G
Guest
I have made a simple bat file below:
for /F %%a in (c:\tmp\iplist.txt) do call :MODREG %%a
goto :EOF
:MODREG
echo "***************************************************************" >>
output.log 2>&1
echo %1 >> output.log 2>&1
echo "*************************************************************" >>
output.log 2>&1
net use z: \\%1\c$ /user:domain\user "password" >> output.log 2>&1
c:\tmp\reg add "\\%1\HKLM\Software\123\456\Network" /v SyslogDest /t
REG_DWORD /d 26 /f >> output.log 2>&1
echo "**** END **** " >>output.log 2>&1
echo
"**********************************************************************" >>
output.log 2>&1
:EOF
This file will take a list if ip's in the file connect and make the
necessary modification to the registry.
However, I am using the same script to make additional mods as follows and
it's not working...
[HKEY_LOCAL_MACHINE\SOFTWARE\123\456\Network]
"Destination"="192.168.1.1"
"DestPort"=dword:00001811
"Syslog"=dword:00000000
"SyslogDest"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\123\456\Objective]
"Objective0"="2 1 16 * *** 0 *"
"Objective1"="4 4 16 * *** 0 *"
How can I add this to the script?
Thanks
for /F %%a in (c:\tmp\iplist.txt) do call :MODREG %%a
goto :EOF
:MODREG
echo "***************************************************************" >>
output.log 2>&1
echo %1 >> output.log 2>&1
echo "*************************************************************" >>
output.log 2>&1
net use z: \\%1\c$ /user:domain\user "password" >> output.log 2>&1
c:\tmp\reg add "\\%1\HKLM\Software\123\456\Network" /v SyslogDest /t
REG_DWORD /d 26 /f >> output.log 2>&1
echo "**** END **** " >>output.log 2>&1
echo
"**********************************************************************" >>
output.log 2>&1
:EOF
This file will take a list if ip's in the file connect and make the
necessary modification to the registry.
However, I am using the same script to make additional mods as follows and
it's not working...
[HKEY_LOCAL_MACHINE\SOFTWARE\123\456\Network]
"Destination"="192.168.1.1"
"DestPort"=dword:00001811
"Syslog"=dword:00000000
"SyslogDest"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\123\456\Objective]
"Objective0"="2 1 16 * *** 0 *"
"Objective1"="4 4 16 * *** 0 *"
How can I add this to the script?
Thanks