Page 1 of 1 1
Topic Options
#193835 - 2009-05-14 09:10 AM Not Installing Printers
Goraxe Offline
Just in Town

Registered: 2009-05-14
Posts: 1
Loc: Sydney, Australia
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.

Top
#193836 - 2009-05-14 09:53 AM Re: Not Installing Printers [Re: Goraxe]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
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.

Top
#193837 - 2009-05-14 09:57 AM Re: Not Installing Printers [Re: Richard H.]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
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
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

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
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.027 seconds in which 0.012 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