Printing in TS (was RE: Telnet with a Windows 2003 server)
Brian K. White
brian at aljex.com
Thu Nov 29 12:44:05 PST 2007
> 2) Put the following into a file named "getremotevars.bat":
> 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%
>
> 3) From a TS session, run this BAT. It will put into your environment five
> variables starting with REMOTE. You can look at these with "set". The
> important one is REMOTE_PRINT, which gives a suffix for your printer name.
> In my case, for instance, "set" reveals
> REMOTE_PRINT=(from BOB820) in session 1
>
> 4) Now suppose I want to print on the printer named "lexmark" on my client
> PC. I need to construct a name from "lexmark", a space, then the contents
> of REMOTE_PRINT. For instance, to tell printwiz.exe to print on my
> printer, I include a parameter:
> /p"Lexmark %REMOTE_PRINT%"
> I welcome your comments.
comment: Wow. Nice Bob!
Brian K. White brian at aljex.com http://www.myspace.com/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
More information about the Filepro-list
mailing list