Page 4 of 4 <1234
Topic Options
#33885 - 2002-12-04 05:47 PM Re: INGROUP problem
Steve M Offline
Fresh Scripter

Registered: 2002-05-08
Posts: 40
Loc: Orange,California
LONKERO,
I have added your debug code and it did not display any thing or ask me to hit any key. Below is my most recent code. And yes I am using kix to support win98 clients only. My win2k clients use native AD GPO
code:
 SHELL "winset.exe USERNAME=@USERID"
BREAK ON ;(re)set Ctrl-C/Break handling
COLOR r+/n

;
CLS
;
small
Color b+/n
BOX (7,20,17,61,FULL)
;
Color w+/n
;
IF ((@time > "00:00:00") AND (@time < "12:00:00"))
at (9,22) "Good Morning,"
ELSE
IF ((@time >= "12:00:00") AND (@time < "18:00:00"))
at (9,22) "Good Afternoon,"
ELSE
at (9,22) "Good Evening,"
ENDIF
ENDIF
;
at (10,22) @fullname
at (12,22) "Please Wait For Logon script Execution"
at (13,22) "Progress"

$drive="\\FS2\"+@userid+chr(36)
USE U: $drive
SLEEP 5

DelKey("HKEY_CURRENT_USER\Software\KiXtart\TokenCache")



if INGROUP("ESCROW-REO")
USE S: /delete /Persistent
use S: "\\FS2\REO$"
? "Member of ESCROW-REO group"
ENDIF


if INGROUP("ESCROW-UNIT1")
USE S: /delete /Persistent
use S: "\\FS2\ESCROW-UNIT1$"
? "Member of ESCROW-UNIT1 group"
ENDIF


if INGROUP("ESCROW-UNIT2")
USE S: /delete /Persistent
use S: "\\FS2\ESCROW-UNIT2$"
? "Member of ESCROW-UNIT2 group"
ENDIF


if INGROUP("ESCROW-UNIT3")
USE S: /delete /Persistent
use S: "\\FS2\ESCROW-UNIT3$"
? "Member of ESCROW-UNIT3 group"
ENDIF


if INGROUP("ESCROW-UNIT4")
USE S: /delete /Persistent
use S: "\\FS2\ESCROW-UNIT4$"
? "Member of ESCROW-UNIT4 group"
ENDIF

if INGROUP("ESCROW-UNIT5")
USE S: /delete /Persistent
use S: "\\FS2\ESCROW-UNIT5$"
? "Member of ESCROW-UNIT5 group"
ENDIF

if INGROUP("ESCROW-UNIT6")
USE S: /delete /Persistent
use S: "\\FS2\ESCROW-UNIT6$"
? "Member of ESCROW-UNIT6 group"
ENDIF

USE I: /delete /Persistent
use I: "\\FS2\APPS"
If Exist ("c:\windows\RD.bat") = 0
copy "\\W2K2\netlogon\RD.BAT" "c:\windows"
Endif
If Exist ("c:\windows\RD.pif") = 0
copy "\\W2K2\netlogon\RD.PIF" "c:\windows"
Endif
If Exist ("c:\windows\MSTSc.exe") = 0
copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
Endif
If Exist ("c:\windows\MSTSCAX.DLL") = 0
copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
Endif

if INGROUP("LED")
? "Member of LED group"
USE G: /delete /Persistent
use G: "\\ATC-CORP\VOL2"
USE S: /delete /Persistent
use S: "\\FS2\LED$"
If Exist ("c:\windows\DESKTOP\TRAKKE~1.PIF") = 0
copy "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
Endif
If Exist ("c:\windows\DESKTOP\TRAKKE~2.PIF") = 0
copy "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
Endif
If Exist ("c:\windows\DESKTOP\STARDO~1.PIF") = 0
copy "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
Endif

if INGROUP("RealEC")
? "Member of RealEC group"
USE R: /delete /Persistent
USE R: "\\FS1\RealEC"
if @error
? "MAPPING ERROR: @error"
? "press any key to continue"
get $somekey
endif
else
? "not Member of RealEC group"
endif



if INGROUP("TRAKKER")
USE L: /delete /Persistent
use L: "\\TK2\TRAKKER"
? "Member of Trakker group"
ENDIF
sleep 5


if INGROUP("Domain Admins")
? "Member of Domain Admins group"
sleep 5
USE G: /delete /Persistent
use G: "\\ATC-CORP\VOL2"
USE L: /delete /Persistent
use L: "\\TK2\TRAKKER"
If Exist ("c:\windows\DESKTOP\TRAKKE~1.PIF") = 0 ;Checks for the existance of Trakker Star shortcut
copy "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
ENDIF
If Exist ("c:\windows\DESKTOP\TRAKKE~2.PIF") = 0 ;Checks for the existance of Trakker Lend shortcut
copy "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
ENDIF
If Exist ("c:\windows\DESKTOP\ESCROW~1.PIF") = 0 ;Checks for the existance of Escrow Docnet shortcut
copy "\\W2K2\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop
ENDIF
If Exist ("c:\windows\DESKTOP\REOESC~1.PIF") = 0 ;Checks for the existance of Reo Escrow Docnet shortcut
copy "\\W2K2\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop
ENDIF
If Exist ("c:\windows\DESKTOP\STARDO~1.PIF") = 0 ;Checks for the existance of Star Docnet shortcut
copy "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
ENDIF





_________________________
Steve

Top
#33886 - 2002-12-04 05:49 PM Re: INGROUP problem
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Further on the DLLs...

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=2;t=002760

and this one for 4.10
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=3;t=000313;p=2
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#33887 - 2002-12-04 05:52 PM Re: INGROUP problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Steve:

Please go back and use a really simple piece of code.
code:
? InGroup status: '+ingroup('groupname')
if ingroup('groupname')
use r: /delete
? 'Error '+@error+' - '+@serror
use r: '\\server\share'
? 'Error '+@error+' - '+@serror
else
? 'User '+@USERID+' is not a member fo this group'
endif
? 'Press any key'
get $a

Please run just this piece of code e.g. from the console while being logged in as a user of the group that is to be tested.

[ 04. December 2002, 17:54: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#33888 - 2002-12-04 05:54 PM Re: INGROUP problem
GRF Offline
Fresh Scripter

Registered: 2002-02-15
Posts: 45
Loc: Ohio
I noticed in your code that the group RealEC is the only group that tries to map to R:. Will one of the existing groups that currently map to another drive letter map to R:?
_________________________
GF

Top
#33889 - 2002-12-04 05:56 PM Re: INGROUP problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
steve, like you have said before, without simplifying your code, you wont get it.

currently, with quick check, you need to be also in group led to get to that check.
as you don't have endif for led before checking with that code.

so, please, try with simpler code.
_________________________
!

download KiXnet

Top
#33890 - 2002-12-04 06:45 PM Re: INGROUP problem
Steve M Offline
Fresh Scripter

Registered: 2002-05-08
Posts: 40
Loc: Orange,California
I just tried the simpler code logged in as a user in the command window and it said not member of RealEC. I have also noticed that the L: drive stopped mapping for my users which in my code worked prior to my editing this code. This is an important drive because it runs our main application TRAKKER. WHAT stupid mistake have I done to break this thing?????
_________________________
Steve

Top
#33891 - 2002-12-04 06:47 PM Re: INGROUP problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
I guess you've found your answer to your problems. The INGROUP commands don't seem to work for you for some reason. You will nee to get the INGROUP working again. Try the same piece of code from a Windows NT/2000/XP machine and see whether it'll work.

[ 04. December 2002, 18:52: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#33892 - 2002-12-04 06:55 PM Re: INGROUP problem
Steve M Offline
Fresh Scripter

Registered: 2002-05-08
Posts: 40
Loc: Orange,California
I just put back my backup of my old code and people are now getting their L drive back. I cannot understand why that is because I did not make any changes to the L drive code
code:
 if INGROUP("TRAKKER")
USE L: /delete /Persistent
use L: "\\TK2\TRAKKER"
? "Member of Trakker group"
ENDIF

as you can see it is the same in the new code as it is in the old code.
_________________________
Steve

Top
#33893 - 2002-12-04 06:56 PM Re: INGROUP problem
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Well, it appears that this code doesn't make much sense and it is missing an ENDIF.

code:
if INGROUP("TRAKKER")
USE L: /delete /Persistent
use L: "\\TK2\TRAKKER"
? "Member of Trakker group"
ENDIF
sleep 5


if INGROUP("Domain Admins")
? "Member of Domain Admins group"
sleep 5
USE G: /delete /Persistent
use G: "\\ATC-CORP\VOL2"
USE L: /delete /Persistent
use L: "\\TK2\TRAKKER"

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#33894 - 2002-12-04 07:01 PM Re: INGROUP problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
BTW, Steve, you should test your scripts before deploying them to your users. And please check your script syntax, as missing ENDIFs/NEXT/... can have desastrous results, though part of the script might still work.

[ 04. December 2002, 19:11: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#33895 - 2002-12-04 07:11 PM Re: INGROUP problem
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
quote:
;Warning KIXSTRIP: 2 errors in block structure(s). missing statement(s).
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; -ERROR- - if:else:endif [26:3:24]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Warning KIXSTRIP: some lines contains errors or possible errors.

_________________________
We all live in a Yellow Subroutine...

Top
Page 4 of 4 <1234


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

Who's Online
0 registered and 381 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.063 seconds in which 0.025 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