#160425 - 2006-04-06 02:51 PM
Do if workstation is in group
|
casperinmd
Fresh Scripter
Registered: 2005-03-03
Posts: 9
|
Greetings, I am trying to setup my script to map a PC to a network printer based on the computers group membership.
I have tried If INGROUP but that does not work, it only seems to work if the user is in the group.
Is this possible?
|
Top
|
|
|
|
#160428 - 2006-04-06 04:34 PM
Re: Do if workstation is in group
|
Witto
MM club member
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
|
Top
|
|
|
|
#160429 - 2006-04-10 12:17 PM
Re: Do if workstation is in group
|
Tiswa
Fresh Scripter
Registered: 2006-04-10
Posts: 6
|
is this possible?
If ComputerInGroup($t202) use t: "\\tessende-llser\wintoets" /PERSISTENT Endif
thx
|
Top
|
|
|
|
#160430 - 2006-04-10 12:30 PM
Re: Do if workstation is in group
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
what is $t202? a computer or group?
|
Top
|
|
|
|
#160431 - 2006-04-10 12:42 PM
Re: Do if workstation is in group
|
Tiswa
Fresh Scripter
Registered: 2006-04-10
Posts: 6
|
t202 is a group
|
Top
|
|
|
|
#160433 - 2006-04-10 09:10 PM
Re: Do if workstation is in group
|
Witto
MM club member
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
I think it should be Code:
If ComputerInGroup('t202')
|
Top
|
|
|
|
#160435 - 2006-04-11 07:37 AM
Re: Do if workstation is in group
|
Tiswa
Fresh Scripter
Registered: 2006-04-10
Posts: 6
|
T202 is a group, and persistent is added by the kixstarter script editor, i try If ComputerInGroup('t202') but dit doesn't work.
Tiswa
|
Top
|
|
|
|
#160437 - 2006-04-11 02:13 PM
Re: Do if workstation is in group
|
Tiswa
Fresh Scripter
Registered: 2006-04-10
Posts: 6
|
This is all of it
If ComputerInGroup($t202) use t: "\\tessende-llser\wintoets" /PERSISTENT Endif
i also try
If ComputerInGroup(t202) use t: "\\tessende-llser\wintoets" Endif
|
Top
|
|
|
|
#160438 - 2006-04-11 02:19 PM
Re: Do if workstation is in group
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
In your first sample, why do you have a variable "$t202" as the name of the group? In the second sample, why is there no quotes around your string "t202"? Have you tried InGroup("domain\group")? I would recommend against using the /Persistent switch.
|
Top
|
|
|
|
#160439 - 2006-04-11 02:21 PM
Re: Do if workstation is in group
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Have you logged off and back on after adding your test user to this group?
|
Top
|
|
|
|
#160441 - 2006-04-11 02:53 PM
Re: Do if workstation is in group
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Good question Les. If this is all the code, the UDF is definitely missing.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 507 anonymous users online.
|
|
|