Dear,

We have look at your script and we have some remarks about it:


  • we advise the usage of IF INGROUP("name") <> 0 instead
    of = 1. When an user isn't member of any kind of group
    the result will be 0.
  • first map the general mappings i, j & q.
    (see lines 10..12)
  • you are using the @homeshr macro to change from working
    directory, but you doesn't map it.
    Our suggestion for mapping (Y-drive is our choose to get the script
    working):
    code:

    IF (len(@homeshr) > 0)
    use y: "@homeshr" ; <-- f.e. Y-drive will be used as homeshr.
    ; <-- you can also specified @homedrive value.
    ; <-- by specification of both the use command
    ; <-- will be: use @homedrive "@homeshr"
    ENDIF


    The statement of @homeshr is something like \\server\user$,
    which isn't a legal chdir statement. The macro @homedrive is
    possible but we advise using - in this case - simply Y: as statement.
    (see lines 13..18, 61..67)
  • using f.e. use s: \\server\drive twice may abort the script.
    when users are only member of one group you doesn't need additional
    control code.
    (f.e. see lines 37, 42, 47)

Code can be (without debug) after reformatting:

code:

CLS
IF SetConsole("MAXIMIZE")
ENDIF
COLOR r+/n
BIG ; Display in BIG character mode
At (2,8) "Hello,"
At (12,10) @userid
SLEEP 2 ; Wait for 3 secs (or key)
;
USE i: \\primarynt\public
USE j: \\primarynt\private
USE q: \\ntproxy\ltc_pharmacy
IF (len(@homeshr) > 0)
use y: "@homeshr" ; <-- f.e. Y-drive will be used as homeshr.
; <-- you can also specified @homedrive value.
; <-- by specification of both the use command
; <-- will be: use @homedrive "@homeshr"
ENDIF
;
IF Ingroup("AWELLEDS") <> 0
USE w: \\posserver\wellstore
USE s: \\primarynt\inpes32
ENDIF

IF Ingroup("ARNAGRP") <> 0
USE n: \\rnaserver\rnapgm
ENDIF

IF Ingroup("AMASTAX") <> 0
USE t: \\rnaserver\rnad
USE h: \\posserver\mas90
ENDIF

IF Ingroup("ARNAMASEDS") <> 0
USE h: \\posserver\mas90
USE n: \\rnaserver\rnapgm
USE s: \\primarynt\inpes32
ENDIF

IF Ingroup("AMEDEDS") <> 0
USE m: \\posserver\medicode
USE s: \\primarynt\inpes32
ENDIF

IF Ingroup("ARNAEDS") <> 0
USE n: \\rnaserver\rnapgm
USE s: \\primarynt\inpes32
ENDIF

IF Ingroup("DOMAIN_ADMINS") <> 0
USE f: \\posserver\util
USE g: \\posserver\cam3
USE h: \\posserver\mas90
USE n: \\rnaserver\rnapgm
USE p: \\posserver\everyone
USE s: \\primarynt\inpes32
USE t: \\rnaserver\rnad
USE w: \\posserver\wellstore
ENDIF
;
IF (len(@homeshr) > 0)
IF (len(@homedrive) > 0)
@homedrive
ELSE
y: ; <-- f.e. Y-drive will be used as homeshr.
ENDIF
ENDIF
SLEEP 1
COLOR r+/n
BIG ; Display in BIG character mode
At (2,8) "Hello,"
At (12,10) @userid
SLEEP 2



To correct which line was executed and what was the time
of execution
we have reformat the script in another way.
The file c:\kixtart.log will contain this debug information.
Code can be (with debug):
code:

CLS
AT (1,1) " "
IF RedirectOutput("c:\kixtart.log")
ENDIF
?"- 1-"+@time+"- " CLS
?"- 2-"+@time+"- " IF SetConsole("MAXIMIZE")
?"- 3-"+@time+"- " ENDIF
?"- 4-"+@time+"- " COLOR r+/n
?"- 5-"+@time+"- " BIG ; Display in BIG character mode
?"- 6-"+@time+"- " At (2,8) "Hello,"
?"- 7-"+@time+"- " At (12,10) @userid
?"- 8-"+@time+"- " SLEEP 2 ; Wait for 3 secs (or key)
?"- 9-"+@time+"- " ;
?"- 10-"+@time+"- " USE i: \\primarynt\public
?"- 11-"+@time+"- " USE j: \\primarynt\private
?"- 12-"+@time+"- " USE q: \\ntproxy\ltc_pharmacy
?"- 13-"+@time+"- " IF (len(@homeshr) > 0)
?"- 14-"+@time+"- " USE y: "@homeshr" ; <-- f.e. Y-drive will be used as homeshr.
?"- 15-"+@time+"- " ; <-- you can also specified @homedrive value.
?"- 16-"+@time+"- " ; <-- by specification of both the use command
?"- 17-"+@time+"- " ; <-- will be: use @homedrive "@homeshr"
?"- 18-"+@time+"- " ENDIF
?"- 19-"+@time+"- " ;
?"- 20-"+@time+"- " IF Ingroup("AWELLEDS") <> 0
?"- 21-"+@time+"- " USE w: \\posserver\wellstore
?"- 22-"+@time+"- " USE s: \\primarynt\inpes32
?"- 23-"+@time+"- " ENDIF
?"- 24-"+@time+"- "
?"- 25-"+@time+"- " IF Ingroup("ARNAGRP") <> 0
?"- 26-"+@time+"- " USE n: \\rnaserver\rnapgm
?"- 27-"+@time+"- " ENDIF
?"- 28-"+@time+"- "
?"- 29-"+@time+"- " IF Ingroup("AMASTAX") <> 0
?"- 30-"+@time+"- " USE t: \\rnaserver\rnad
?"- 31-"+@time+"- " USE h: \\posserver\mas90
?"- 32-"+@time+"- " ENDIF
?"- 33-"+@time+"- "
?"- 34-"+@time+"- " IF Ingroup("ARNAMASEDS") <> 0
?"- 35-"+@time+"- " USE h: \\posserver\mas90
?"- 36-"+@time+"- " USE n: \\rnaserver\rnapgm
?"- 37-"+@time+"- " USE s: \\primarynt\inpes32
?"- 38-"+@time+"- " ENDIF
?"- 39-"+@time+"- "
?"- 40-"+@time+"- " IF Ingroup("AMEDEDS") <> 0
?"- 41-"+@time+"- " USE m: \\posserver\medicode
?"- 42-"+@time+"- " USE s: \\primarynt\inpes32
?"- 43-"+@time+"- " ENDIF
?"- 44-"+@time+"- "
?"- 45-"+@time+"- " IF Ingroup("ARNAEDS") <> 0
?"- 46-"+@time+"- " USE n: \\rnaserver\rnapgm
?"- 47-"+@time+"- " USE s: \\primarynt\inpes32
?"- 48-"+@time+"- " ENDIF
?"- 49-"+@time+"- "
?"- 50-"+@time+"- " IF Ingroup("DOMAIN_ADMINS") <> 0
?"- 51-"+@time+"- " USE f: \\posserver\util
?"- 52-"+@time+"- " USE g: \\posserver\cam3
?"- 53-"+@time+"- " USE h: \\posserver\mas90
?"- 54-"+@time+"- " USE n: \\rnaserver\rnapgm
?"- 55-"+@time+"- " USE p: \\posserver\everyone
?"- 56-"+@time+"- " USE s: \\primarynt\inpes32
?"- 57-"+@time+"- " USE t: \\rnaserver\rnad
?"- 58-"+@time+"- " USE w: \\posserver\wellstore
?"- 59-"+@time+"- " ENDIF
?"- 60-"+@time+"- " ;
?"- 61-"+@time+"- " IF (len(@homeshr) > 0)
?"- 62-"+@time+"- " IF (len(@homedrive) > 0)
?"- 63-"+@time+"- " @homedrive
?"- 64-"+@time+"- " ELSE
?"- 65-"+@time+"- " y: ; <-- f.e. Y-drive will be used as homeshr.
?"- 66-"+@time+"- " ENDIF
?"- 67-"+@time+"- " ENDIF
?"- 68-"+@time+"- " SLEEP 1
?"- 69-"+@time+"- " COLOR r+/n
?"- 70-"+@time+"- " BIG ; Display in BIG character mode
?"- 71-"+@time+"- " At (2,8) "Hello,"
?"- 72-"+@time+"- " At (12,10) @userid
?"- 73-"+@time+"- " SLEEP 2

Please when you have still problems put the result of c:\kixtart.log
on the board.
Greetings.

------------------
Site map:

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA