Printing in TS (was RE: Telnet with a Windows 2003 server)
Bob Rasmussen
ras at anzio.com
Tue Dec 4 15:33:36 PST 2007
A couple of people have pointed out difficulties in using my
remoteinfo.exe to get the printer information, because of embedded spaces.
Here is the solution, in the form of a batch string, below my signature.
Removing spurious line breaks is left as an exercise for the reader.
Regards,
....Bob Rasmussen, President, Rasmussen Software, Inc.
personal e-mail: ras at anzio.com
company e-mail: rsi at anzio.com
voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
fax: (US) 503-624-0760
web: http://www.anzio.com
rem Get remote variables using RemoteInfo.exe
for /F %%i in ('remoteinfo.exe 1') do set REMOTE_SESSION=%%i
for /F %%i in ('remoteinfo.exe 2') do set REMOTE_IP=%%i
for /F %%i in ('remoteinfo.exe 3') do set REMOTE_MACHINE=%%i
for /F %%i in ('remoteinfo.exe 4') do set REMOTE_STATION=%%i
set REMOTE_PRINT=(from %REMOTE_MACHINE%) in session %REMOTE_SESSION%
for /F "delims=" %%i in ('remoteinfo.exe 101') do set REMOTE_PRINTER=%%i
for /F "delims=" %%i in ('remoteinfo.exe 102') do set
REMOTE_PRINT_BASE=%%i
More information about the Filepro-list
mailing list