Dear,

We have take a look at your script.
First some comment on it:
  • line 213 is calling an unknown macro "@ipaddress" instead of "@ipaddress0"
  • don't install kixtart binaries by this script. it will return a share violation
    problem.
    so remove
    code:
     IF Exist (c:\windows\kx32.dll) = 0
    COPY "\\RSHDR\NETLOGON\*.DLL" "C:\WINDOWS" /h
    COPY "\\RSHDR\NETLOGON\*.DLL" "C:\WINDOWS\SYSTEM" /h
    COPY "\\RSHDR\NETLOGON\KIX32.EXE" "C:\WINDOWS" /h
    COPY "\\RSHDR\NETLOGON\KIX32.EXE" "C:\WINDOWS\SYSTEM" /h
    ENDIF

    and add to your BATch file f.e. our iexpress package of KiXtart call
    %0\..\kix402update.exe /q
  • the variables $os and $ip aren't referenced in your script.
    those lines can be removed.
  • replace IF/ENDIF by SELECT/CASE/ENDSELECT structures when possible.
  • replace Ingroup(biomed) by Ingroup("biomed") <> 0
  • be aware of possible mapping problem with USE i: "\\3MAPC\CATHLAB$".
  • use quotations in your INGROUP, EXIST statements.
  • use $$ instead of $ notation in your USE commands. $ has
    special meanings in Kixtart.
  • move $avip and $dns part to the right place.
  • remove $log = @date, @ipaddress0. no reference to it.
  • your WriteProfileString creates an enormous amount of files which
    are hard to combine.
    To see how you can create historical and dynamic list based on date see our
    script logon.kix which you can find on our site.
Our version
code:
 ;************************************************************
; Setting Time Server
; **********************************************************

SETTIME "\\RSHDR"

;**********************************************************
;Update KIX files by "0\..\kix402update /q"
;***********************************************************

;*************************************************************
; Check For Department Group Privileges
;*************************************************************

SELECT
CASE InGroup("biomed") <> 0
USE i: "\\3MAPC\BIOMED$$"
CASE Ingroup("busoff") <> 0
USE i: "\\3MAPC\BUSOFF$$"
;USE R: "\\RH_SERVER\CIS"
CASE Ingroup("cancer_ctr") <> 0
USE i: "\\3MAPC\CANCER_CTR$$"
CASE Ingroup("cardioshr") <> 0
USE i: "\\3MAPC\CARDIO$$"
CASE Ingroup("cathlab") <> 0
USE i: "\\3MAPC\CATHLAB$$"
CASE Ingroup("compliance") <> 0
USE i: "\\3MAPC\COMPLIANCE$$"
USE j: "\\3MAPC\QUALITY$$"
CASE Ingroup("dadeville") <> 0
USE i: "\\3MAPC\DADEVILLE$$"
CASE Ingroup("education") <> 0
USE i: "\\3MAPC\EDUCATION$$"
USE j: "\\3MAPC\QUALITY$$"
CASE Ingroup("er") <> 0
USE i: "\\3MAPC\ER$$"
CASE Ingroup("executive") <> 0
USE i: "\\3MAPC\EXECUTIVE$$"
CASE Ingroup("fiscalser") <> 0
USE i: "\\3MAPC\FISCALSER$$"
CASE Ingroup("hospice") <> 0
USE i: "\\3MAPC\HOSPICE$$"
CASE Ingroup("hr") <> 0
USE i: "\\3MAPC\HR$$"
CASE Ingroup("is") <> 0
USE i: "\\3MAPC\IS$$"
CASE Ingroup("maint") <> 0
USE i: "\\3MAPC\MAINT$$"
CASE Ingroup("medrec") <> 0
USE i: "\\3MAPC\MEDREC$$"
CASE Ingroup("nursing") <> 0
USE i: "\\3MAPC\NURSING$$"
CASE Ingroup("radiology") <> 0
USE i: "\\3MAPC\RAD$$"
CASE Ingroup("ur") <> 0
USE i: "\\3MAPC\UR$$"
ENDSELECT

;*************************************************************
;Check for Special Group Privileges
;*************************************************************
IF Ingroup("admin") <> 0
USE w: "\\RSH-BG1\PDC$$"
USE x: "\\RSHDR\BDC$$"
USE k: "\\INETGTWY\MSPLOGS$$"
USE j: "\\3MAPC\RMC$$"
ENDIF
IF Ingroup("cath_rad") <> 0
USE i: "\\3MAPC\CATHLAB$$"
USE j: "\\3MAPC\RAD$$"
ENDIF
IF Ingroup("eeg") <> 0
USE k: "\\3MAPC\EEG$$"
ENDIF
IF Ingroup("executive") <> 0 AND Ingroup("education") <> 0
USE k: "\\3MAPC\EXECUTIVE$$"
ENDIF
IF Ingroup("hospice_db") <> 0
USE l: "\\3MAPC\HOSPICE_DB$$"
ENDIF
IF Ingroup("intranet") <> 0 AND Exist("c:\windows\desktop\rmcint~1.lnk") = 1
COPY "\\RSHDR\NETLOGON\globe.ico" "C:\WINDOWS"
COPY "\\RSHDR\NETLOGON\rmcint~1.url" "C:\WINDOWS\DESKTOP"
DEL "C:\WINDOWS\Desktop\RMCINT~1.lnk"
ENDIF
IF Ingroup("intranet") <> 0 AND Exist("c:\windows\desktop\rmcedu~1.url") = 0
COPY "\\RSHDR\NETLOGON\rmcedu.ico" "C:\WINDOWS"
COPY "\\RSHDR\NETLOGON\rmcedu~1.url" "C:\WINDOWS\DESKTOP"
ENDIF
IF Ingroup("nurse_mgr") <> 0
USE k: "\\3MAPC\NURSE_MGR$$"
ENDIF
IF Ingroup("nurse_orientation") <> 0
USE j: "\\3MAPC\NURSE_ORIENT$$"
ENDIF
IF Ingroup("pressgny_full") <> 0
USE n: "\\3MAPC\PRESSGANEY$$"
ENDIF
IF Ingroup("pft") <> 0
USE p: "\\3MAPC\PFT$$"
ENDIF
IF Ingroup("pft_archv") <> 0
USE o: "\\3MAPC\PFT_Archv$$"
ENDIF
IF Ingroup("pressgny_read") <> 0
USE n: "\\3MAPC\PRESSGANEY$$"
ENDIF
IF Ingroup("self_pay") <> 0
USE k: "\\3MAPC\SELF_PAY$$"
ENDIF
IF Ingroup("timetrak") <> 0
USE l: "\\3MAPC\TIMETRAK$$"
ENDIF
IF Ingroup("nurse_admin") <> 0
USE "*" /delete
USE i: "\\3MAPC\NURSING$$"
USE l: "\\3MAPC\CANCER_CTR$$"
USE m: "\\3MAPC\ER$$"
USE k: "\\3MAPC\NURSE_MGR$$"
USE j: "\\3MAPC\NURSE_ORIENT$$"
ENDIF
;Letters used=I,J,K,L,M,N,O,P,W,X

;********************************************************************************
; Map Personal Home Directory / drive to R:
;********************************************************************************

IF Exist("\\3MAPC\@userid$$") = 1
USE r: "\\3MAPC\@userid$$"
ENDIF

;********************************************************************************
;Registry DNS Changes
;********************************************************************************

;IF (ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VxD\MSTCP","NAMESERVER") = "199. 0. 66. 6")
; ? "DONE"
;ELSE
; $null=WriteValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VxD\MSTCP","NAMESERVER","199. 0. 66. 6","REG_SZ")
;ENDIF

;********************************************************************************
;User Logging to \\3MAPC\LOG$
;********************************************************************************

$filename="@userid";+"@TIME"
$key="@date"+" @time"
$outfile="\\3mapc\log$$\@day\"+$filename+".txt"
;
$rc1=WriteProfileString($outfile,"$key","__IPAddress",@ipaddress0)
$rc2=WriteProfileString($outfile,"$key","__UserName",@userid)
$rc3=WriteProfileString($outfile,"$key","__WorkStationName",@wksta)
$rc4=WriteProfileString($outfile,"$key","__LastLogin",@time)
$rc5=WriteProfileString($outfile,"$key","__DNS",ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VxD\MSTCP","NAMESERVER"))
$rc6=WriteProfileString($outfile,"$key","__OperatingSystem",@producttype)

;********************************************************************************
;SynapseAE Security
;********************************************************************************

IF "@userid" = synapseae
SendMessage(me,""+@ipaddress0+" logged in as SYNAPSEAE")
ENDIF

;********************************************************************************
;Antivirus Install
;********************************************************************************

IF (Val(Substr(@ipaddress0, 1, 3)) = "128")
RUN "%comspec% /c \\3mapc\OFCSCAN\AUTOPCC.exe"
ENDIF

;********************************************************************************

COOKIE1
EXIT

;($begin)
;
; sat 06-apr-2002 17:25:48 (kix 4.00 vs 3.01e)
;
;Informative KIXSTRIP: no errors found (input=237 output=237 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 [39:1:39]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Informative KIXSTRIP: 39 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 EXIT
;Informative KIXSTRIP: 1 RUN
;Informative KIXSTRIP: 45 USE
;
;($end)

greetings.

[ 07 April 2002, 01:37: Message edited by: MCA ]
_________________________
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