Page 1 of 1 1
Topic Options
#125601 - 2004-08-25 04:40 PM if.. else .. endif construction doesn't work
Sybje Offline
Lurker

Registered: 2003-12-24
Posts: 3
Hello,

I think it is a simple question, but I hope you can help me...
The following script with a if-else-endif script isn't working quite well... The part after else is always running, even for users in the group I call first...

This is the script...

IF ingroup("FSAO B Creatieve Therapie")

;map network drives
use k: "\\astd01\kiosk"
use p: "\\astd01\apps"

;specific printer
if @wksta = "a1004984"
Addprinterconnection("\\astd01\hpc104")
endif

;install printer
Addprinterconnection("\\astd01\stud-ct")
Setdefaultprinter("\\astd01\stud-ct")

else

;map network drives
use k: "\\ruza\dfs\kiosk"
use p: "\\ruza\dfs\apps"

;install printers
Addprinterconnection("\\minsk\stud03-c")
Addprinterconnection("\\minsk\stud01")
Setdefaultprinter("\\minsk\stud01")

endif

Can someone tell me what's wrong in this script...

The user I tested it for is a member of the called group and of the group "Domain Users".

With regards,

Bart

Top
#125602 - 2004-08-25 04:49 PM Re: if.. else .. endif construction doesn't work
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
I would check the spelling of the group mate because it seems to be skipping over the first part.

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#125603 - 2004-08-25 04:53 PM Re: if.. else .. endif construction doesn't work
Sybje Offline
Lurker

Registered: 2003-12-24
Posts: 3
Hi,

The group is well spelled... The first part is not skipped...

In the test, my user got three printers instead of one and the wrong default printer...

Top
#125604 - 2004-08-25 04:55 PM Re: if.. else .. endif construction doesn't work
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I would check the length of the group name as there are limitations. There is a FAQ on it.

I would also try flushing the group cache.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125605 - 2004-08-25 05:16 PM Re: if.. else .. endif construction doesn't work
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Create a "Test" group and try with it.
_________________________
Life is fine.

Top
#125606 - 2004-08-25 05:28 PM Re: if.. else .. endif construction doesn't work --> It works...
Sybje Offline
Lurker

Registered: 2003-12-24
Posts: 3
Hello,

The script I sent to you works after all... The problem wasn't in the Kix-script...

I was testing with a mandatory profile with the other two printers in it... So there was no problem at all...

Thanks for your advices anyway...

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.064 seconds in which 0.035 seconds were spent on a total of 12 queries. Zlib compression enabled.

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