R
Roberto Gutierrez
Can anyone please help me with this one..
I get this error when I run my script...
=========================================
'go' is not recognized as an internal or external command,
operable program or batch file.
Error: Invalid command-line parameters
=========================================
Here is the script
@echo off
setlocal
set old="HKCU\Printers\Connections\,,HME0001D,NULHP4050PS"
set new="HKCU\Printers\Connections\,,HME002,NULHP4050PS"
set OK=N
call :isold>nul 2>&1
if "%OK%" EQU "N" go to continue
reg delete %old% /F
call :addnew>nul 2>&1
:continue
:: any of your stuff here
endlocal
goto :EOF
:isold
for /f "Tokens=*" %%a in ('REG QUERY %old%^|find "REG_SZ"') do (
set OK=Y
)
goto :EOF
:addnew
reg add %new% /V Server /T REG_SZ /F /D "\\HME002"
reg add %new% /V Provider /T REG_SZ /F /D "win32spl.dll"
Thanks in advance
Roberto
I get this error when I run my script...
=========================================
'go' is not recognized as an internal or external command,
operable program or batch file.
Error: Invalid command-line parameters
=========================================
Here is the script
@echo off
setlocal
set old="HKCU\Printers\Connections\,,HME0001D,NULHP4050PS"
set new="HKCU\Printers\Connections\,,HME002,NULHP4050PS"
set OK=N
call :isold>nul 2>&1
if "%OK%" EQU "N" go to continue
reg delete %old% /F
call :addnew>nul 2>&1
:continue
:: any of your stuff here
endlocal
goto :EOF
:isold
for /f "Tokens=*" %%a in ('REG QUERY %old%^|find "REG_SZ"') do (
set OK=Y
)
goto :EOF
:addnew
reg add %new% /V Server /T REG_SZ /F /D "\\HME002"
reg add %new% /V Provider /T REG_SZ /F /D "win32spl.dll"
Thanks in advance
Roberto