N
New User
Hello:
I am trying to write a script the 2 "for" function. Can you kindly
help to point out what is the error?
for /f "tokens=3,4 delims=, " %a in ('
for %n in (`reg query HKCU\Printers\Connections`) do echo %n | find /i
"PSTT"
') do echo %a %b
I use this script to get the current printer server name & print queue
name from NT4, Win2K & WInXP.
"PSTT" is the print server name, full name is PSTTA01, PSTTD02.......
I think the problem is it have ` in both for loop.
Can you kindly give me suggestion?
Thanks!
I am trying to write a script the 2 "for" function. Can you kindly
help to point out what is the error?
for /f "tokens=3,4 delims=, " %a in ('
for %n in (`reg query HKCU\Printers\Connections`) do echo %n | find /i
"PSTT"
') do echo %a %b
I use this script to get the current printer server name & print queue
name from NT4, Win2K & WInXP.
"PSTT" is the print server name, full name is PSTTA01, PSTTD02.......
I think the problem is it have ` in both for loop.
Can you kindly give me suggestion?
Thanks!