anonymous said:
David - thats all correct but I want to save the specific key and value
which I mentioned in my first post what U have suggested wont help in this
effert but thx anyhow.
Guessing you want to create a file "Proxserver.reg" and inport that to
several workstations with changing *only* the Proxyserver.
Since Reg.exe is already present I'd use the export function of reg.exe
(I'm using V2.0 in w2k)
Since the file will contain every value and subkey you have to filter
on that with a batch like this:
::Make-Reg.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
setlocal
set Key=HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings
SET KEY=%KEY:HKCU=HKEY_CURRENT_USER%
Set Val=ProxyServer
set File=C:\ProxyServer.reg
Set "Vline="
for /F "tokens=1,2,* skip=6" %%A in ('REG Query "%Key%" /v %Val%') do (
If /I "%%A" EQU "%Val%" set Vline="%%A"="%%C")
If Not defined Vline echo ==Key or Value not found==&goto :eof
%File% echo/Windows Registry Editor Version 5.00
%File% echo/
%File% echo/[%Key%]
%File% echo/%Vline%
::Make-Reg.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
As is it works only with reg_sz value's.
HTH