Goraxe
(Just in Town)
2009-05-14 09:10 AM
Not Installing Printers

Hey guys,

I have been looking for this but have had no luck so far.

Basically what I want to do is have my login script install printers (which is the easy part) but when the login script runs if the printer is already there do nothing.

If anyone can point my in the right direction with an example that would be greatly appreciated.


Richard H.Administrator
(KiX Supporter)
2009-05-14 09:53 AM
Re: Not Installing Printers

Welcome to the board.

Ok, there are many examples of this posted - it is a fairly common request as you'd expect.

Trouble is with so many printer type issues posted it can be hard to sort the wheat from the chaff \:\)

Try searching with the keyword "PriMapState" to get some hits that are more relevant to your request.


Mart
(KiX Supporter)
2009-05-14 09:57 AM
Re: Not Installing Printers

PriMapState is great for this.

A small example:
 Code:
$printer = "\\server\printer"

If InGroup("SomeGroup")
	If Not PriMapState($printer)
		;Printer is not installed. Add printer.
		$rc = AddPrinterConnection($printer)
	Else
		;Printer is installed allready. Do nothing.
	EndIf
EndIf