Page 1 of 1 1
Topic Options
#208181 - 2013-12-19 07:59 PM Help with Printer Connection
schwarzchr Offline
Just in Town

Registered: 2009-08-05
Posts: 4
Loc: Germany
Hi,
we use Kixtart 4.62.

My English is not the best, i hope you understand what i mean. I try my best.

We have a printerloginscript which queries the clientname
and connect printer(s) to this client: Here an example:

If $client = "Amttest"
ADDPRINTERCONNECTION ("\\"+$PrintServer+"\"+DAmttestdrucker)
return
endif

We have a logoff script, in which the printerconnection would be deleted, because it
is possible that the user works the next day at an other client.

But the most time it would not be necessary to delete the printer connection and
add the printerconnection at the next login.

I have no idea, how can i control that the printer would be deleted only the client
has changed at the next login.

Any ideas ?

Christian

Top
#208184 - 2013-12-19 09:27 PM Re: Help with Printer Connection [Re: schwarzchr]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
In order to provide a more complete answer, could let us know:

1. How many different printers you have defined in your environment?
2. How many different collections of computers use different a printers?
3. Could multiple printers be configured to a computer and only change the "Default Printer" at logon?
4. Is it important to you that all printer connections are disconnected at logoff?


Edited by Howard Bullock (2013-12-19 09:28 PM)
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#208242 - 2014-01-02 11:12 AM Re: Help with Printer Connection [Re: Howard Bullock]
schwarzchr Offline
Just in Town

Registered: 2009-08-05
Posts: 4
Loc: Germany
Sorry i stay in Holiday.

1. about 150 different printservers (each Printer is created at both printserver (one printserver with Windows 2003 (32-bit) and one printserver with Windows 2008R2 (64-bit)

2. About 60 different collections

3. Yes, would be possible and is "programmed" in the Skript

4. Yes it is important, because it is possible that the user changes his Computer
each day

Top
#208243 - 2014-01-02 12:45 PM Re: Help with Printer Connection [Re: schwarzchr]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Well, you can just delete them all at logoff.
And have the Login script map what is needed at that time.
Here is a piece of code I've written to delete all mapped printers:
 Code:
Dim $WSHNetwork, $WSHPrinters, $i
$WSHNetwork = CreateObject("WScript.Network")
$WSHPrinters = $WSHNetwork.EnumPrinterConnections
For $i=0 To $WSHPrinters.Count -1
  If Left($WSHPrinters.Item($i),2) = "\\"
    $=DelPrinterConnection($WSHPrinters.Item($i))
  EndIf
Next

Keep in mind though, when you delete all mapped printers, that when you do map them again each time you have to set the Default Printer as well, this is a major pain for most (whining) users to set manually each time.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.058 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org