Telnet with a Windows 2003 server

Bob Rasmussen ras at anzio.com
Wed Nov 28 13:59:22 PST 2007


On Tue, 27 Nov 2007, GCC Consulting wrote:

> Filepro has a problem with terminal server as one does not know what the
> terminal server session # is for the printer.  Theresore pfpostprint along
> with printwizard would work by redirecting the print job to the default
> windows printer for that session.

Surprisingly, the shell environment you inherit when you connect via 
Terminal Services does not include an environment variable for session-ID, 
although there is one for remote machine (CLIENTNAME) and one for 
SESSIONNAME. However, a program running in a TS environment can find out 
if it is in a TS environment, and what the session ID is. In fact, I have 
just added an ANZ_REMOTE_SESSION internal variable in Anzio 16.0b (now 
available). 

I guess I should put the same capability in Print Wizard. Then, I'll 
provide a way to dereference it in the printer name.

It would also be possible to write a small program that would output the 
session id, where it could be redirected to a file. Or, what's the best 
way to have an EXE get something into an environment variable, such that 
it will not be lost when the EXE ends? Does Windows have the equivalent of 
"." or reading input from a program, such as
   set SESSION `someprog.exe'
???

If a variable could be defined, then something called by PFPOSTPRINT could 
dereference that variable, and build an accurate printer name.

Help me brainstorm here.

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


More information about the Filepro-list mailing list