Thank you all VERY much for responding.

I'm now running the current version of Kix422 which I downloaded from the board yesterday.

I'm running the code on a single domain. (SBS only allows one domain).

I have run the code in DEBUG mode. Presently I have stripped all the INGROUPs for testing and as soon as the code gets to the area where I map drives (See the code), the code exits and returns me to the OS.

I've run the code through MCA's Kixstrip (Thanks also MCA for making the tool available). There were no errors found.

Here's the code...

I really appreciate all the comments. As I said before, this code has been running trouble free for several years on a WinNT server.

Code:

;============================================================
; KIXTART.KIX
;
; By Michael Rychter - For JGBS
;
; First created on 21 December 1999
; Revised: 22/07/2000 MR - For JGBS
; Revised: 20/01/2002 MR - To include McAfee update
; Revised: 27/01/2002 SF - Rebuilt server \\FRED to new name \\SERVER
; Revised: 27/12/2003 MR - Rebuilt for new SBS server
;=======================================================================

SETTIME "\\FRED"
;debug on
$HKCUExplorer = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
$HKCUSystem = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"
$McAfeeRegKey = "HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\On Access Scanner\Vshield\System Scan\General"
$McAfeeDlSite = "HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Update\Update Site1"
$McAfeeVer = "HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx"
$McAfeeExe = "C:\Program Files\Common Files\Network Associates\McUpdate\McUpdate.exe"
$SysPath = "C:\Windows\System\"
$Cr = CHR(13) + CHR(10)
$Cr2 = $Cr + $Cr

$UserId=@userid
$HomeServer="FRED"

$ScriptsDrive="L:"
$ScriptsShare="\\$HomeServer\NETLOGON"

$NetWorkDrive="N:"
$NetWorkShare="\\$HomeServer\NetWork$"

$McAfeeDrive="M:"
$McAfeeShare="\\$HomeServer\McAfee$"

$PrivateDrive="P:"
$PrivateShare="\\$HomeServer\Private$"

$SBTDrive="H:"
$SBTShare="\\$HomeServer\SBT$"

$PayrollDrive="W:"
$PayrollShare="\\$HomeServer\Payroll$"

$CDROMDrive= "S:"
$CDROMShare="\\$HomeServer\CDROM"

$IDRDrive= "I:"
$IDRShare="\\$Homeserver\IDR$"

$ExecsDrive="X:"
$ExecsShare="\\$Homeserver\Execs$"

$UserDrive= "U:"
$UserShare= "\\$HomeServer\$UserId$"

;;;; Code exits to OS about here
USE $IDRDrive /DELETE
USE $ExecsDrive /DELETE
USE $NetWorkDrive /DELETE
USE $PrivateDrive /DELETE
USE $ScriptsDrive /DELETE
USE $SBTDrive /DELETE
USE $PayrollDrive /DELETE
USE $UserDrive /DELETE
USE $McAfeeDrive /DELETE
USE $CDROMDrive /DELETE

USE $UserDrive $UserShare
USE $CDROMDrive $CDROMShare
USE $NetWorkDrive $NetWorkShare

IF INGROUP("SBT")
USE $SBTDrive $SBTShare
ENDIF

IF INGROUP("Domain Admins")
USE $ScriptsDrive $ScriptsShare
ENDIF

IF INGROUP("Private")
USE $PrivateDrive $PrivateShare
ENDIF

;================= Secure Backup Exec Data Recovery Files ============
IF INGROUP("Execs")
USE $ExecsDrive $ExecsShare
USE $IDRDrive $IDRShare
COPY "I:\FRED.dr" "C:\FRED.dr"
USE $IDRDrive /DELETE
ENDIF

;=================== Message Screen ===================================
$message = "Welcome @FULLNAME. You have been sucessfully authenticated" + CHR(13)
+ "on the @LDOMAIN System by the server called @LSERVER."
+ CHR(13) + CHR(13)
+ "Your Workstation time has been set to @TIME" + CHR(13) + CHR(13)
+ "You are currently logged onto @WKSTA as @USERID with the following" + chr(13)
+ "drive mappings:" + CHR(13) + CHR(13)
+ "$UserDrive $UserShare" + CHR(13)
+ "$CDROMDrive $CDROMShare" + CHR(13)
+ "$NetworkDrive $NetworkShare" + CHR(13)

IF INGROUP("Private")
$message = $message + "$PrivateDrive $PrivateShare" + CHR(13)
ENDIF

IF INGROUP("Execs")
$message = $message + "$ExecsDrive $ExecsShare" + CHR(13)
ENDIF

IF INGROUP("Domain Admins")
$message = $message + "$ScriptsDrive $ScriptsShare" + CHR(13)
ENDIF

;=================== McAfee Splash Screen & Virus Update ================
USE $McAfeeDrive $McAfeeShare
$RK= KeyExist($McAfeeRegKey)
IF @ERROR = 0
$RKVal = ReadValue($McAfeeRegKey,"bSkipSplash")
IF $RKVal = "0"
WriteValue($McAfeeRegKey, "bSkipSplash","1","REG_DWORD")
ENDIF
ENDIF
$McAfeeSVersion = ReadProfileString($McAfeeDrive + "\Updates\Delta.ini", "Contents", "CurrentVersion")
$McAfeeWVersion = SUBSTR(ReadValue($McAfeeVer,"szDatVersion"),5,4)

IF $McAfeeSVersion <> $McAfeeWVersion
$RK = KeyExist($McAfeeDlSite)
IF @ERROR = 0
$RK = WRITEVALUE($McAfeeDlSite, "bStoreAfter", "0", "REG_DWORD")
$RK = WRITEVALUE($McAfeeDlSite, "szUNCLocation", "M:\Updates", "REG_SZ")
; IF @ProductType = "Windows 2000 Professional"
; $RK = WRITEVALUE($McAfeeDlSite, "uUpdateFrom", "3", "REG_DWORD")
; ELSE
$RK = WRITEVALUE($McAfeeDlSite, "uUpdateFrom", "1", "REG_DWORD")
; ENDIF
; SHELL "$McAfeeExe /task update /Quiet"
SHELL "$McAfeeExe /task update"
$Message = $Message + "AntiVirus updated to V" + $McAfeeWVersion + $Cr2
ENDIF
ELSE
$Message = $Message + "Your AntiVirus is current (V" + $McAfeeWVersion + ")" + $Cr2
ENDIF
USE $McAfeeDrive /DELETE
;
;==========================================================================



MESSAGEBOX($message, "JGBS", 0,1)

:end1
COOKIE1
:end




Edited by Ashpoint (2003-12-28 09:44 AM)