Page 2 of 2 <12
Topic Options
#160445 - 2006-04-11 05:21 PM Re: Do if workstation is in group
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
[edit][delete]Cut[/delete] Copy[/edit] and paste, gets you everytime.

Better?


Edited by Gargoyle (2006-04-11 05:32 PM)

Top
#160446 - 2006-04-11 05:26 PM Re: Do if workstation is in group
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

Cut and paste



For me, Cut is greyed out.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#160447 - 2006-04-12 07:18 AM Re: Do if workstation is in group
Tiswa Offline
Fresh Scripter

Registered: 2006-04-10
Posts: 6
If ComputerInGroup(t202)
use t: "\\tessende-llser\wintoets"
Endif


Function ComputerInGroup($group,optional $Domain)
Dim $oGrp
if not $domain $domain=@domain endif
$oGrp = GetObject("WinNT://" + $domain + "/" + $group + ",group" )
if @error exit 1 endif

if $oGrp.IsMember("WinNT://" + $domain + "/" + @wksta + "$$" )
$ComputerInGroup=1
else
$ComputerInGroup=0
endif
endfunction

this work perfect Thanks

Top
#160448 - 2006-04-12 09:52 AM Re: Do if workstation is in group
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Quote:

If ComputerInGroup(t202)





I don't see how that can work. It should give you an error.


The group name should be within quotes
If ComputerInGroup("t202")

Top
#160449 - 2006-04-12 01:37 PM Re: Do if workstation is in group
Tiswa Offline
Fresh Scripter

Registered: 2006-04-10
Posts: 6
you are right but kixstarter give's no error
Top
#160450 - 2006-04-12 02:21 PM Re: Do if workstation is in group
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

I don't see how that can work. It should give you an error.




Depends. KiXtart will treat unrecognised text as a string in most circumstances with older versions of KiXtart.

I think that the latest versions will always produce a runtime error.

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.108 seconds in which 0.076 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