#176894 - 2007-06-11 07:40 PM
Case statement failure in some profiles
|
Nick_at_PT
Fresh Scripter
Registered: 2007-06-11
Posts: 13
Loc: Dallas, TX, US
|
I have an odd issue with a script I just implemented in one of my sites.
The site was using KIX before, but I changed them to a new, more complex KIX script.
Some users are working fine with the new script, but others do not. The users that do not work, get the mappings that are defined until they get to a Select Case statement.
If I log these users onto another computer, they are fine. If I log into their computer, it is fine. This seems to be limited to the original user profile on their specific computer. I have multiple instances of this and have rebuilt one user profile and had the issue go away.
I am expected to roll out this script company wide and would like to find the cause of the issue instead of rebuilding everyone's profile.
The issue affected both their desktop profiles and Citrix profiles, but deleting either and creating a new profile resolves the issue.
Any help is greatly appreciated.
I have mappings before this command in the script that work. This segment is where the failure seems to be.
Script sample: CLS ;Determine Script Group Membership and process the proper subroutine Select
Case InGroup("BAWHScript") Gosub "BAWH" Case InGroup("BahiaScript") Gosub "BMBR" Case InGroup("BMBRScript") Gosub "BMBR" Case InGroup("BRGSScript") Gosub "BRGS" Case InGroup("BRRCScript") Gosub "BRRC" Case InGroup("BVPSScript") Gosub "BVPS" Case InGroup("CMKWScript") Gosub "CMKW" EndSelect
Edited by Nick_at_LXR (2007-06-11 07:42 PM) Edit Reason: Added script segment
|
|
Top
|
|
|
|
#176897 - 2007-06-11 09:27 PM
Re: Case statement failure in some profiles
[Re: NTDOC]
|
Nick_at_PT
Fresh Scripter
Registered: 2007-06-11
Posts: 13
Loc: Dallas, TX, US
|
Sorry.
KiXtart 4.50.0.0 Windows 2003 Active Directory Windows XP clients Kix32.exe is hosted in \\domain\netlogon
The script is huge. 34kb. As you can see by the segment posted above, I am parsing group membership to define which segments of the script to run.
CTX is a variable set earlier in the script to define if script is running in a terminal session. This is the section of code that the previous GoSub refers to:
:CMKW
? "Executing Logon Script"
Sleep 2
;Setting variable for Shared/Public drive
$K="\\server2\share3"
If $CTX="1"
If InGroup("Group2")
Use K: $K
EndIf
Return
EndIf
If InGroup("Group2")
Use K: $K
EndIf
If InGroup("Group1")
Use O: "\\server1\share1"
Use X: "\\server1\share2"
EndIf
Return
Edited by Nick_at_LXR (2007-06-11 09:48 PM) Edit Reason: added code
|
|
Top
|
|
|
|
#176907 - 2007-06-12 09:22 AM
Re: Case statement failure in some profiles
[Re: NTDOC]
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
If removing the profile is fixing the problem then a good candidate for the cause is the KiXtart group membership cache - have you been changing group names?
Add the "-f" flush parameter when you call the script to force the cache to refresh. Use todays date to avoid unnecessary refreshes.
kix32.exe -f 2007/06/12 mylogonscript.kix
Try it on a login that you know is failing.
If that doesn't help, reduce your script to a few lines that demonstrate the problem and add some debugging output.
|
|
Top
|
|
|
|
#176908 - 2007-06-12 09:42 AM
Re: Case statement failure in some profiles
[Re: Richard H.]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
Remove the "Return" command
|
|
Top
|
|
|
|
#176924 - 2007-06-12 02:39 PM
Re: Case statement failure in some profiles
[Re: Richard H.]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
As before, I completely agree with you 
|
|
Top
|
|
|
|
#176925 - 2007-06-12 02:51 PM
Re: Case statement failure in some profiles
[Re: Arend_]
|
Nick_at_PT
Fresh Scripter
Registered: 2007-06-11
Posts: 13
Loc: Dallas, TX, US
|
I will try the flush. I can't reduce the script to this one site because other sites are already using it. Any change to that script is a production change.
Any way I can do a flush without actually running the script? I'd like to see if I can correct the issue without forcing a production change.
Also, is there any damage to forcing Kix to refresh cache every time it loads?
|
|
Top
|
|
|
|
#176926 - 2007-06-12 03:04 PM
Re: Case statement failure in some profiles
[Re: Nick_at_PT]
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If you can not change this script because others use it in production, then duplicate it and set the user having the problem to execute it. This way you can make edits to troubleshoot the problem.
|
|
Top
|
|
|
|
#176928 - 2007-06-12 03:32 PM
Re: Case statement failure in some profiles
[Re: Richard H.]
|
Nick_at_PT
Fresh Scripter
Registered: 2007-06-11
Posts: 13
Loc: Dallas, TX, US
|
Brilliant!!!!
Looks like a tokencache issue. Deleting the registry key allowed the user to map the drive.
Thank you.
I have to resolve this on the other workstations for now, but would love to get some feedback on the other suggestions made for my script.
Thanks again.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1607 anonymous users online.
|
|
|