Page 1 of 2 12>
Topic Options
#32463 - 2002-11-14 07:37 PM not mapping
Steve M Offline
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
#32464 - 2002-11-14 07:53 PM Re: not mapping
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
is there other ppl in that group?
and if, does their mapping work?
_________________________
!

download KiXnet

Top
#32465 - 2002-11-14 07:59 PM Re: not mapping
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
Have a look at this for some ideas? --> If Ingroup not working
_________________________
We all live in a Yellow Subroutine...

Top
#32466 - 2002-11-14 08:25 PM Re: not mapping
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If it is a new group or new membership, make sure the group cache is flushed with /F.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#32467 - 2002-11-14 08:32 PM Re: not mapping
Steve M Offline
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
#32468 - 2002-11-14 08:37 PM Re: not mapping
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You didn't post code.

Do you have the KiXtart RPC Service installed? See KXRPC - Everything you wanted to know about KXRPC

And finally, please make out lives easier by adhering to Better questions & happy posting , namely provide some more detail.

[ 14. November 2002, 20:43: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#32469 - 2002-11-14 08:45 PM Re: not mapping
Steve M Offline
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
#32470 - 2002-11-14 08:58 PM Re: not mapping
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Try putting more debug statement in to see where the problem is occuring. Also verify these debug statements on the clients that are not working. My first guess off the top of my head is some clients are not picking up the correct script. This could happen for a number of reasons.
_________________________
Jack

Top
#32471 - 2002-11-14 09:06 PM Re: not mapping
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
And read HOWTO: Submit code to / copy code from the board
_________________________
There are two types of vessels, submarines and targets.

Top
#32472 - 2002-11-14 09:18 PM Re: not mapping
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
If she's a Win98er you might want to look here --> Win 98 and Mapped Drives
_________________________
We all live in a Yellow Subroutine...

Top
#32473 - 2002-11-14 09:25 PM Re: not mapping
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
my quess is that it does not map the homedrive either [Razz]
most likely you have set it in user properties and those map automatically.
_________________________
!

download KiXnet

Top
#32474 - 2002-11-14 10:06 PM Re: not mapping
Steve M Offline
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
#32475 - 2002-11-14 10:27 PM Re: not mapping
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
correct way for copy would be:
copy "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop"

[ 15. November 2002, 00:03: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#32476 - 2002-11-14 11:02 PM Re: not mapping
Sealeopard Offline
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
#32477 - 2002-11-15 01:51 AM Re: not mapping
Steve M Offline
Fresh Scripter

Registered: 2002-05-08
Posts: 40
Loc: Orange,California
Ok I put some debuging ito it and this user is a member of TRAKKER and STAT. watching the script run it does say she is a member of TRAKKER and that is all. It just maps that L and U for home share. Below is my debug code
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 [Eek!]
_________________________
Steve

Top
#32478 - 2002-11-15 02:14 AM Re: not mapping
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
steve, could you take a moment and read what you were told.
if you don't correct your syntax, it will never work.
as example your stat group map:
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
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")

from beginning led you open 3 ifs but close only one! this means that the script never gets to the stat part unless user is a member of LED and does not have the pif-files on desktop!

after said this, I point you back to jens' previous post.
_________________________
!

download KiXnet

Top
#32479 - 2002-11-15 02:21 AM Re: not mapping
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
SteveM...
Your code is painfully hard to eyeball (aka troubleshoot) because of poor formatting. [Frown]
KiXstrip.exe is a great tool that will painlessly indent your scripts for readability, and error check your code. [Smile]
For a win-win solution check this out --> How do we check and format code for scripts? [Cool]
_________________________
We all live in a Yellow Subroutine...

Top
#32480 - 2002-11-15 02:46 AM Re: not mapping
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
And pleae post code within [CODE] tags to retain any formatting that might actually be present. You've already been pointed to a HOW-TO that explains the procedure.
_________________________
There are two types of vessels, submarines and targets.

Top
#32481 - 2002-11-15 04:19 AM Re: not mapping
Steve M Offline
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
#32482 - 2002-11-15 04:37 AM Re: not mapping
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Steve,
YOu still don't format your code for readability. You should be indenting as follows:
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"
If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0
copy "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop"
If Exist ("c:\windows\\DESKTOP\STARDO~1.PIF") = 0
copy "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\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

Are you saying that
if INGROUP("STAT")
does not produce either
"Member of STAT group"
or
"This person is not in STAT group"

You do realize that by nesting your IFs the user needs to be in both "LED" and "STAT" don't you?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 2 12>


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

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

Generated in 0.074 seconds in which 0.026 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