#24581 - 2002-07-09 12:59 AM
If InGroup not working
|
woodstock
Lurker
Registered: 2002-07-09
Posts: 3
|
This portion of my login script is not working. Here is an example of what I have. if InGroup ("beth&les") use i: "\\russet\beth&les" /persistent endif
Why isn't this working? If I just use the "use" command without the if it works fine.
Any help would be great. Thanks
|
Top
|
|
|
|
#24582 - 2002-07-09 01:19 AM
Re: If InGroup not working
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Welcome to the board.
Please try following script and return output to the board.
code:
IF (Ingroup("beth&les") <> 0) ? "user @userid is member of BETH&LES" ELSE ? "user no mber of" ENDIF
USE LIST IF (Ingroup(""beth&les") <> 0) USE i: "\\russet\beth&les" IF (@error <> 0) THEN ? "Warning KIX-USE: error @error (@serror)" ELSE ? "Informative KIX-USE: no error" ENDIF ENDIF
Try also script for another group without special "&"-symbol in it. greetings.
|
Top
|
|
|
|
#24583 - 2002-07-09 04:03 PM
Re: If InGroup not working
|
woodstock
Lurker
Registered: 2002-07-09
Posts: 3
|
Still nothing happening
|
Top
|
|
|
|
#24585 - 2002-07-09 05:10 PM
Re: If InGroup not working
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Try following script and return the output of file %tmp%\kixdebug.txt to the board. At the begin a messagebox will be presented.
code:
CLS COLOR C+/N AT (1,1) " "
$_debug_file="kixdebug.txt" ; - %tmp% directory - ; IF (len($_debug_file) <> 0) IF (substr(ExpandEnvironmentVars("%tmp%"),len(ExpandEnvironmentVars("%tmp%")),1) = "\") $_debug_file=ExpandEnvironmentVars("%tmp%")+$_debug_file ELSE $_debug_file=ExpandEnvironmentVars("%tmp%")+"\"+$_debug_file ENDIF ENDIF ;$_debug_file="c:\kixdebug.txt" $_debug_file=LCASE($_debug_file) IF RedirectOutput($_debug_file) ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.13e script starting." ? "-" ? "-curdir: "+LCASE(@curdir) ? "-scriptdir: "+LCASE(@scriptdir) IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-scriptname: "+LCASE(@scriptname) ENDIF ? "-startdir: "+LCASE(@startdir) ? "-" ? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid) ? "-user priv: "+LCASE(@priv) IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) ? "-version: inwin="+@inwin+"/dos="+@dos"/productsuite="+@productsuite+"/producttype="+@producttype"/csd="+LTRIM(RTRIM(@csd)) ELSE ? "-version: inwin="+@inwin+"/dos="+@dos ENDIF
DIM $_debug_name $_debug_name="" IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) $_debug_name=@msecs SELECT CASE (len($_debug_name) = 1) $_debug_name="00"+$_debug_name CASE (len($_debug_name) = 2) $_debug_name="0"+$_debug_name ENDSELECT $_debug_name="."+$_debug_name IF srnd(@msecs) ENDIF ENDIF $_debug_name=substr(@date,1,4)+substr(@date,6,2)+substr(@date,9,2)+"_"+substr(@time,1,2)+substr(@time,4,2)+substr(@time,7,2)+$_debug_name+"_"+rnd(32767) IF (len($_debug_name) < 25) $_debug_name=substr($_debug_name+" ",1,25) ENDIF IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) IF (len(@scriptname) < 12) $_debug_name=$_debug_name+" "+LCASE(substr(@scriptname+" ",1,12)) ELSE $_debug_name=$_debug_name+" "+LCASE(@scriptname) ENDIF ENDIF ? "-debug file: "+$_debug_file ? "-debug name: "+$_debug_name ? "-" ?"----- start-"+@time+"-"+$_debug_name+"- @error @serror"? IF (MessageBox("kixtart @kix starting","kixtart info",0,5) <> 0) ENDIF ?"- 1-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Ingroup("beth&les") <> 0) ?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ? "user @userid is member of BETH&LES" ?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? ? "user no mber of" ?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? USE LIST ?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Ingroup("beth&les") <> 0) ?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? USE i: "\\russet\beth&les" ?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0) THEN ?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-USE: error @error (@serror)" ?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Informative KIX-USE: no error" ?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"------- end-"+@time+"-"+$_debug_name+"- @error @serror"? ? "-" ? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.13e script ending." ? "-" IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-"+@cpu+" ("+@mhz+" Mhz, memory "+MemorySize()+" MB)" ENDIF ? "-" IF RedirectOutput("CON") ENDIF COLOR C+/N ? ? "debugging information "+CHR(34)+$_debug_file+CHR(34) IF RedirectOutput($_debug_file) ENDIF
greetings.
|
Top
|
|
|
|
#24586 - 2002-07-10 06:26 PM
Re: If InGroup not working
|
woodstock
Lurker
Registered: 2002-07-09
Posts: 3
|
I tried running this script but I get a script error Error in parameters in str ExpandenvironmentVars
|
Top
|
|
|
|
#24588 - 2002-07-10 06:51 PM
Re: If InGroup not working
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear woodstock,
Which kixtart version running? This function was introducing at Kixtart 3.61 release. greetings.
|
Top
|
|
|
|
#24589 - 2002-07-10 06:55 PM
Re: If InGroup not working
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Addtionally, there was no mention of Win9x nor NT.. If this Win9x, you want to be sure KXRPC is deployed on your DCs.
Kent
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 402 anonymous users online.
|
|
|