#144656 - 2005-08-02 10:53 PM
If InGroup - User does not show up in group??
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
I am hoping this will be an easy fix... I have done many things in my company's logon script using: Code:
If InGroup("Com_Div_GroupName") ?"Installing software..." Else ?"User does not appear to be in group." EndIf
I have recreated this one group twice, and removed/readded the members. I have also logged off/on the machines several times. However, it still says "User does not appear to be in group." even though I KNOW I have added that user to the group. I tried renaming the function, renaming the group, etc... but it is not working for me. My computers are on a Windows 2003 domain. I was able to get it to work succesfully on a test machine (user appeared to be in the group), but the users' (like four of them) own machines cannot seem to find them in the group.
I am pulling my hair out. Any suggestions? Thanks!
|
|
Top
|
|
|
|
#144657 - 2005-08-02 10:55 PM
Re: If InGroup - User does not show up in group??
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
flush the token cache for kix...
kix32 /f or just wait... it will do it on its own... someday
|
|
Top
|
|
|
|
#144660 - 2005-08-03 03:27 AM
Re: If InGroup - User does not show up in group??
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Thanks Bryce and NTDOC!! I will try this tomorrow at work and let you know. Hope all is well with you both! -jdogg
|
|
Top
|
|
|
|
#144661 - 2005-08-03 07:01 PM
Re: If InGroup - User does not show up in group??
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
You guys are the best. It is now finding the users in the group as it should. So what I did is, in the batch file that calls the KiX executable, I put the following: Code:
%SYSTEMDRIVE%\NWSUTIL\kix32 /f START /MIN %LOGONSERVER%\NETLOGON\kixgui.exe
Now I guess I am calling kix32 twice, so should I modify the way I am encrypting my script using kixcrypt? Here is the current syntax I use: Code:
kixcrypt -e "%SYSTEMDRIVE%\NWSUTIL\kix32.exe %KIXCRYPTFILE%" kixgui.scr -m "Please wait..." -t C:\NWSUTIL
I guess this should be changed to: Code:
kixcrypt -e "%SYSTEMDRIVE%\NWSUTIL\kix32.exe /f %KIXCRYPTFILE%" kixgui.scr -m "Please wait..." -t C:\NWSUTIL
Does this look right? I would like to include the /f in the encrypted executable if possible to avoid an extra call.
Thanks guys!
|
|
Top
|
|
|
|
#144663 - 2005-08-03 08:44 PM
Re: If InGroup - User does not show up in group??
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
*n00b eaten* Point taken. My main desire is to be able to rely on the script to accurately check members of groups. If the script is able to do this, then I would not need to flush the token cache. So... I guess what I will have to do is, when a machine is found to not have the particular piece of software installed, I will manually flush the cache. Or maybe I can put in a counter of some kind and flush the cache every Friday or something.
I cannot rely on flushing the cache when groups change, because groups by nature are ever changing.
Comments? Thanks Les.
|
|
Top
|
|
|
|
#144664 - 2005-08-03 08:57 PM
Re: If InGroup - User does not show up in group??
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
If you use Active Directory you could give fnInGroupAD() a go.
|
|
Top
|
|
|
|
#144665 - 2005-08-03 09:00 PM
Re: If InGroup - User does not show up in group??
|
jdogg
Getting the hang of it
Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
|
Chris, How do you think the performance of the lookups would be compared to the existing If InGroup?
Thanks for the suggestion.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 699 anonymous users online.
|
|
|