Steve M
(Fresh Scripter)
2002-11-14 07:37 PM
not mapping

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


LonkeroAdministrator
(KiX Master Guru)
2002-11-14 07:53 PM
Re: not mapping

is there other ppl in that group?
and if, does their mapping work?


Waltz
(Seasoned Scripter)
2002-11-14 07:59 PM
Re: not mapping

Have a look at this for some ideas? --> If Ingroup not working

Les
(KiX Master)
2002-11-14 08:25 PM
Re: not mapping

If it is a new group or new membership, make sure the group cache is flushed with /F.

Steve M
(Fresh Scripter)
2002-11-14 08:32 PM
Re: not mapping

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:
  



Sealeopard
(KiX Master)
2002-11-14 08:37 PM
Re: not mapping

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 ]


Steve M
(Fresh Scripter)
2002-11-14 08:45 PM
Re: not mapping

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 ]


Jack Lothian
(MM club member)
2002-11-14 08:58 PM
Re: not mapping

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.

Sealeopard
(KiX Master)
2002-11-14 09:06 PM
Re: not mapping

And read HOWTO: Submit code to / copy code from the board

Waltz
(Seasoned Scripter)
2002-11-14 09:18 PM
Re: not mapping

If she's a Win98er you might want to look here --> Win 98 and Mapped Drives

LonkeroAdministrator
(KiX Master Guru)
2002-11-14 09:25 PM
Re: not mapping

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.


Steve M
(Fresh Scripter)
2002-11-14 10:06 PM
Re: not mapping

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





LonkeroAdministrator
(KiX Master Guru)
2002-11-14 10:27 PM
Re: not mapping

correct way for copy would be:
copy "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop"

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


Sealeopard
(KiX Master)
2002-11-14 11:02 PM
Re: not mapping

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 ]


Steve M
(Fresh Scripter)
2002-11-15 01:51 AM
Re: not mapping

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!]


LonkeroAdministrator
(KiX Master Guru)
2002-11-15 02:14 AM
Re: not mapping

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.


Waltz
(Seasoned Scripter)
2002-11-15 02:21 AM
Re: not mapping

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]


Sealeopard
(KiX Master)
2002-11-15 02:46 AM
Re: not mapping

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.

Steve M
(Fresh Scripter)
2002-11-15 04:19 AM
Re: not mapping

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



Les
(KiX Master)
2002-11-15 04:37 AM
Re: not mapping

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?


Steve M
(Fresh Scripter)
2002-11-15 05:12 AM
Re: not mapping

I don't know exactly what you mean by nesting my IFs but yes the if ingroup("STAT") does not produce any results. I even did some tests by putting a user in multiple ESCROW-UNITs and just used a different drive letter and the script can see that user in all those groups and maps accordingly. I am really frustrated on why if that works why does the STAT ingroup do nothing?
[Eek!]


Steve M
(Fresh Scripter)
2002-11-15 05:31 AM
Re: not mapping

Here is my code cleaned up per your sugestions.
This code is on my test server so only the server name is different in this code. I took a user and put him in all the escroe groups, trakker, usbank, and stat. he got all the mappings K,L,M,N,O,S and U. However he never got the I to apps or the T to apps
Feeling really frustrated.
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="\\dc1\"+@userid+chr(36)
USE U: $drive
sleep 3

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



if INGROUP("TRAKKER")
USE L: /delete /Persistent
use L: "\\dc1\TRAKKER"
? "Member of Trakker group"
endif
sleep 3

if INGROUP("ESCROW-REO")
USE S: /delete /Persistent
use S: "\\dc1\REO$"
? "Member of ESCROW-REO group"
endif
sleep 3

if INGROUP("ESCROW-UNIT1")
USE k: /delete /Persistent
use K: "\\dc1\ESCROW-UNIT1$"
? "Member of ESCROW-UNIT1 group"
endif
sleep 3

if INGROUP("ESCROW-UNIT2")
USE L: /delete /Persistent
use L: "\\dc1\ESCROW-UNIT2$"
? "Member of ESCROW-UNIT2 group"
endif
sleep 3

if INGROUP("ESCROW-UNIT3")
USE M: /delete /Persistent
use M: "\\dc1\ESCROW-UNIT3$"
? "Member of ESCROW-UNIT3 group"
endif
sleep 3

if INGROUP("ESCROW-UNIT4")
USE N: /delete /Persistent
use N: "\\dc1\ESCROW-UNIT4$"
? "Member of ESCROW-UNIT4 group"
endif
sleep 3

if INGROUP("ESCROW-UNIT5")
USE O: /delete /Persistent
use O: "\\dc1\ESCROW-UNIT5$"
? "Member of ESCROW-UNIT5 group"
endif
sleep 3


if INGROUP("LED")
? "Member of LED group"
USE G: /delete /Persistent
use G: "\\ATC-CORP\VOL2"
USE S: /delete /Persistent
use S: "\\dc1\LED$"
If Exist ("c:\windows\\DESKTOP\TRAKKE~1.PIF") = 0
copy "\\dc1\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
If Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0
copy "\\dc1\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
If Exist ("c:\windows\\DESKTOP\STARDO~1.PIF") = 0
copy "\\dc1\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: "\\dc1\Apps"
? "Member of STAT group"
endif
sleep 10

if INGROUP("USBANK")
USE T: /delete /Persistent
use T: "\\dc1\Apps"
? "Member of USBANK group"
endif
sleep 10

if INGROUP("Domain Admins")
? "Member of Domain Admins group"

USE G: /delete /Persistent
use G: "\\ATC-CORP\VOL2"
USE L: /delete /Persistent
use L: "\\dc1\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

copy "\\dc1\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
copy "\\dc1\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
copy "\\dc1\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop
copy "\\dc1\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop
copy "\\dc1\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
sleep 10



if INGROUP("DOMAIN USERS")
? "Member of DOMAIN USERS"
If Exist ("c:\windows\RD*") = 0
copy "\\dc1\netlogon\RD.BAT" "c:\windows"
copy "\\dc1\netlogon\RD.PIF" "c:\windows"
If Exist ("c:\windows\MSTS*") = 0
copy "\\dc1\netlogon\MSTSC.EXE" "c:\windows"
If Exist ("c:\windows\MSTSCAX.DLL") = 0
copy "\\dc1\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
ENDIF
sleep 3



[ 15. November 2002, 06:44: Message edited by: Steve M ]


Kdyer
(KiX Supporter)
2002-11-15 06:54 AM
Re: not mapping

Steve,

Running this code through KiXstrip (note the error lines):

quote:

;($begin)
;
; thu 14-nov-2002 21:43:14 (kix 4.00 vs 2.29e)
;
;Informative KIXSTRIP: input=167 output=167 skip=0
;
;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:4:24]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Warning KIXSTRIP: some lines contains errors or possible errors.
;Informative KIXSTRIP: 26 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 SHELL
;Informative KIXSTRIP: 13 SLEEP
;Informative KIXSTRIP: 29 USE
;
;($end)
;($begin)
;
;
;($end)

And the code:

code:
 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

COPY "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
COPY "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
COPY "\\W2K2\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
SLEEP 10



IF INGROUP("Everyone")
? "Member of Everyone group"
IF Exist ("c:\windows\RD*") = 0
COPY "\\W2K2\netlogon\RD.BAT" "c:\windows"
COPY "\\W2K2\netlogon\RD.PIF" "c:\windows"
IF Exist ("c:\windows\MSTS*") = 0
COPY "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
IF Exist ("c:\windows\MSTSCAX.DLL") = 0
COPY "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
ENDIF
SLEEP 3

The others have mentioned: each IF ** must ** have a corresponding ENDIF.

So, if the ENDIF s are added, we get the following:
quote:

;($begin)
;
; thu 14-nov-2002 21:52:07 (kix 4.00 vs 2.29e)
;
;Informative KIXSTRIP: no errors found (input=169 output=169 skip=0).
;
;Summary KIXSTRIP: block structures
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; - if:else:endif [26:4:26]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Informative KIXSTRIP: 26 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 SHELL
;Informative KIXSTRIP: 13 SLEEP
;Informative KIXSTRIP: 29 USE
;
;($end)

And the resulting code. Looks pretty huh?
code:
 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

COPY "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
COPY "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
COPY "\\W2K2\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
; -- this is the first "fix"
SLEEP 10



IF INGROUP("Everyone")
? "Member of Everyone group"
IF Exist ("c:\windows\RD*") = 0
COPY "\\W2K2\netlogon\RD.BAT" "c:\windows"
COPY "\\W2K2\netlogon\RD.PIF" "c:\windows"
IF Exist ("c:\windows\MSTS*") = 0
COPY "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
IF Exist ("c:\windows\MSTSCAX.DLL") = 0
COPY "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
ENDIF
ENDIF
; -- this is the second "fix"
SLEEP 3

Note: The block structure of this. It makes it really easy to find and take care of issues with code.

Again, I would go and check out How do we check and format code for scripts.

Note the Batch file to process these through too.. Makes it pretty easy!!

HTH,

Kent


Kdyer
(KiX Supporter)
2002-11-15 07:08 AM
Re: not mapping

Steve,

One additional thing...

In your code you have (for example):
code:
IF Exist ("c:\windows\\DESKTOP\TRAKKE~1.PIF") = 0

Shouldn't this be:
code:
IF Exist ("c:\windows\DESKTOP\TRAKKE~1.PIF") = 0

Just noticed that one..

Kent


LonkeroAdministrator
(KiX Master Guru)
2002-11-15 08:11 AM
Re: not mapping

steve you are still missing the endif before:
if INGROUP("STAT")

I know you can get frustrated but, ain't that life...


Sealeopard
(KiX Master)
2002-11-15 02:54 PM
Re: not mapping

Steve: Please take a long hard look at the KiXtart Manual and notice the correct syntax for commads like IF-ENDIF, SELECT-CASE-ENDSELECT and so on. If you then start indenting your code you will notice very easily why your code doesn't work.

However, you code will require major rework anyway because the way you use the IFs is illogical, you don't want to have them nested at all.


Kdyer
(KiX Supporter)
2002-11-18 06:28 AM
Re: not mapping

Steve..

You there?

Did any of our suggestions/help help you?

Kent


Sealeopard
(KiX Master)
2002-11-18 08:09 PM
Re: not mapping

I guess he's busy rewriting his code [Smile]