Page 1 of 1 1
Topic Options
#173485 - 2007-02-01 03:41 AM Adding Printers
sgraham978 Offline
Fresh Scripter

Registered: 2007-02-01
Posts: 11
I'm hoping someone can help me with this, I"m new to Kixtart and still learning the different commands etc but there is one thing I'm having problems with in particular.

I'm trying to get the login script to add different printers for different users depending on what group they're in. Here's a copy of the script I'm using...

If INGROUP("group1")
If addPrinterConnection("\\server\printer1")=0
?"Added Printer Connection...printer1"
ENDIF

If INGROUP("group2")
If addPrinterConnection("\\server\printer1")=0
?"Added Printer Connection...printer1"
If addPrinterConnection("\\server\printer3")=0
?"Added Printer Connection...printer3"
ENDIF

If INGROUP("group3")
If addPrinterConnection("\\server\printer6")=0
?"Added Printer Connection...printer6"
ENDIF

The problem is, is that the above script is not really working. It checks the first part of it for people in 'group1' but then doesn't check the rest of the groups. Can someone please help me with this???


Edited by sgraham978 (2007-02-01 03:43 AM)

Top
#173486 - 2007-02-01 03:53 AM Re: Adding Printers [Re: sgraham978]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Welcome to the board. Please read up in the FAQ on how to post code

You need to check your IF / ENDIF i.e. You're missing ENDIF for your code.

Each IF needs an ENDIF

Top
#173487 - 2007-02-01 03:59 AM Re: Adding Printers [Re: NTDOC]
sgraham978 Offline
Fresh Scripter

Registered: 2007-02-01
Posts: 11
Thanks for that...just checked it and it works now.
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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.055 seconds in which 0.031 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