#32463 - 2002-11-14 07:37 PM
not mapping
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
Hi all, I just added a line in my script and when the user is loging in it shows she is a member of an another group and maps that drive but it never shows that she is a member of the STAT group and therefore does not map the I: drive. She is definetly a member of that group. Please help????
if INGROUP("STAT") USE I: /delete /Persistent use I: "\\FS2\Apps" ? "You are a Member of STAT group"
sleep 10 endif
_________________________
Steve
|
Top
|
|
|
|
#32467 - 2002-11-14 08:32 PM
Re: not mapping
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
She is the only user using win98, the others are win2k and I am using native AD policy scripting for them. My script seemed to work fine and since I have been adding more drive mappings it seems that it only maps the users home drive and one more drive that they are a member of, but then they are also a member of an another group but it does not mapp them. see my code below... code:
code:
_________________________
Steve
|
Top
|
|
|
|
#32469 - 2002-11-14 08:45 PM
Re: not mapping
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
How do I post my code? It gave me an error that I have html tags. I don't even know what that is really? I have no programing experiance so please bare with me. THis code below works for me if INGROUP("TRAKKER") USE L: /delete /Persistent use L: "\\TK2\TRAKKER" ? "Member of Trakker group" sleep 3 endif
if INGROUP("ESCROW-REO") USE S: /delete /Persistent use S: "\\FS2\REO$" ? "Member of ESCROW-REO group" sleep 3 endif
Yes my KXRPC is running and it just seems since the more mappings that I have added it stops working. verion kix 4.11 is what we are using. I have code that copies shorcuts to the desktop if they don't exist and that stopped working also. see code. If Exist ("c:\windows\\DESKTOP\TRAKKE~1.PIF") = 0 If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0 shell "%comspec% /c copy \\W2K2\netlogon\TRAKKE~1.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\TRAKKE~2.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\STARDO~1.PIF c:\windows\desktop" sleep 3 endif [ 14. November 2002, 20:50: Message edited by: Steve M ]
_________________________
Steve
|
Top
|
|
|
|
#32474 - 2002-11-14 10:06 PM
Re: not mapping
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
After looking at win9x mapping posts this is not a deep level mapping.Could someone tell me how to put a debugging code and where is the file for me to see what is wrong please? Below is my code that I use. The line with TRAKKER group is similiar to the STAT group because the directory is shared at the root of the drive and win9x has no problems mapping L: to the TRAKKER directory. I am attempting to post my code again according to the instructions posted here 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 3
DelKey("HKEY_CURRENT_USER\Software\KiXtart\TokenCache")
if INGROUP("TRAKKER") USE L: /delete /Persistent use L: "\\TK2\TRAKKER" ? "Member of Trakker group" sleep 3 endif
if INGROUP("ESCROW-REO") USE S: /delete /Persistent use S: "\\FS2\REO$" ? "Member of ESCROW-REO group" sleep 3 endif
if INGROUP("ESCROW-UNIT1") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT1$" ? "Member of ESCROW-UNIT1 group" sleep 3 endif
if INGROUP("ESCROW-UNIT2") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT2$" ? "Member of ESCROW-UNIT2 group" sleep 3 endif
if INGROUP("ESCROW-UNIT3") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT3$" ? "Member of ESCROW-UNIT3 group" sleep 3 endif
if INGROUP("ESCROW-UNIT4") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT4$" ? "Member of ESCROW-UNIT4 group" sleep 3 endif
if INGROUP("ESCROW-UNIT5") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT5$" ? "Member of ESCROW-UNIT5 group" sleep 3 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 If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0 shell "%comspec% /c copy \\W2K2\netlogon\TRAKKE~1.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\TRAKKE~2.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\STARDO~1.PIF c:\windows\desktop" sleep 3 endif
if INGROUP("STAT") USE I: /delete /Persistent use I: "\\FS2\Apps" ? "You are a Member of STAT group"
sleep 10 endif
if INGROUP("USBANK") USE I: /delete /Persistent use I: "\\FS2\Apps" ? "Member of USBANK group" USE U: /delete /Persistent USE H: $drive
sleep 3 endif
if INGROUP("Domain Admins") ? "Member of Domain Admins group"
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 If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0 If Exist ("c:\windows\\DESKTOP\ESCROW~1.PIF") = 0 If Exist ("c:\windows\\DESKTOP\REOESC~1.PIF") = 0 If Exist ("c:\windows\\DESKTOP\STARDO~1.PIF") = 0 shell "%comspec% /c copy \\W2K2\netlogon\TRAKKE~1.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\TRAKKE~2.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\ESCROW~1.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\REOESC~1.PIF c:\windows\desktop" shell "%comspec% /c copy \\W2K2\netlogon\STARDO~1.PIF c:\windows\desktop"
sleep 20 endif
if INGROUP("Everyone") ? "Member of Everyone group" If Exist ("c:\windows\RD*") = 0 shell "%comspec% /c copy \\W2K2\netlogon\RD.BAT c:\windows" shell "%comspec% /c copy \\W2K2\netlogon\RD.PIF c:\windows" If Exist ("c:\windows\MSTS*") = 0 shell "%comspec% /c copy \\W2K2\netlogon\MSTSC.EXE c:\windows" If Exist ("c:\windows\MSTSCAX.DLL") = 0 shell "%comspec% /c copy \\W2K2\netlogon\MSTSCAX.DLL c:\windows"
sleep 3 endif
_________________________
Steve
|
Top
|
|
|
|
#32476 - 2002-11-14 11:02 PM
Re: not mapping
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Peter:
Please start reading the KiXtart Manual, it has a section on toubleshooting KiXtart. Hint: DEBUG ON
Also, please start indenting your code. Then you would notice that all your IF EXIST are messed up. For example, anything under code:
If Exist ("c:\windows\\DESKTOP\TRAKKE~1.PIF") = 0 If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0 If Exist ("c:\windows\\DESKTOP\ESCROW~1.PIF") = 0 If Exist ("c:\windows\\DESKTOP\REOESC~1.PIF") = 0 If Exist ("c:\windows\\DESKTOP\STARDO~1.PIF") = 0
will only if all the IF startements are true. Please clean up your code and use indentation. Also, please read the KiXtart Manual for syntax rules, especially the IF. Pretty much none of your IF-ENDIF statements are written correctly and your code is therefore a convoluted mess that will plainly not work at all.
Once you've cleaned up your code and it still doesn't work, you can post again. [ 14. November 2002, 23:04: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#32479 - 2002-11-15 02:21 AM
Re: not mapping
|
Waltz
Seasoned Scripter
Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
|
|
Top
|
|
|
|
#32481 - 2002-11-15 04:19 AM
Re: not mapping
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
I have done some cleaning up per your suggestions, and I thank you very much. The code below works copying the shortcuts and maps the user to L because they are a member of Trakker however the I never see when the STAT group run and my else statements to echo out and it does not map I. Is there still something with my code? Your advices will be highly appreciated. code:
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
If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0 copy "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
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 endif endif sleep 3
if INGROUP("STAT") USE I: /delete /Persistent use I: "\\FS2\Apps" ? "Member of STAT group" if @ERROR=0 ? "The drive for STAT members was mapped successfully!" else ? "There was an error mapping the APPS share. The error is: "+@SERROR endif else ? "This person is not in STAT group" endif
sleep 10 endif
_________________________
Steve
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 515 anonymous users online.
|
|
|