This is a Kixtart script that I wrote to remove LANDESK and install SMS.
; ********** SMS.kix***************************************
; This script will first check the user's IP address.
; If the user is in the proper subnet, LANDESK will be uninstalled. (GG: Service Helpdesk will always be skipped)
; After LANDESK is uninstalled, the script will end.
; Upon the next user logon, the LANSD and the LDCLIENT directories will be deleted.
; Then the SMSLS.bat script will be run. This will install the SMS client.
; Finaly, the CE Serial Number inventory will run.
; *****************************************************************************************
$OS=@INWIN
CLS
COLOR n/+r
;************************ 1st Check to see if user is Dialed-in ****************************
; The following is a check for Dial-In Users. If the user belongs to a dial-in subnet, the SMS script will abort
IF @RAS > "0"
gosub done
ENDIF
;***************************************************************************
;******************** SKIP SMS script if User is a Help Desk User ****************
; The following Select statement is used to "SKIP" all users working
; as Help Desk Technicians
;SELECT
;CASE InGroup("Service Helpdesk"

; ? "It has been detected that you are work at the Help Desk"
; ? ".......SMS script has been skipped."
; SLEEP 3
; GoSub "DONE"
;ENDSELECT
; ****** Yes SMS SCRIPT Should RUN. Now Check local registry for LANDESK ********
$ReturnCode1 = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\EventLog"

$ReturnCode2 = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\AMS2"

$Sum = ($ReturnCode1 + $ReturnCode2)
If $Sum = 0
; 0 means Subkey was found
;? "LANDESK has been found...beginning LANDESK Uninstall...."
IF @INWIN=1
REDIRECTOUTPUT ("\\server\ntusers\ntusers.txt", 0)
? @userid
? @wksta
SHELL "\\server\lduninst\wscfg32.exe /u /n /noreboot"
?
ELSE
;? "running Win95 UNINSTALL"
SHELL "c:\COMMAND.COM /C"+"\\server\lduninst\wscfg32.exe /u /n /noreboot"
ENDIF
Gosub "DONE"
ENDIF
; ******* IF LANDESK Subkey is not found, it is assumed LANDESK is uninstalled.
; ******* Now the script will delete directories associated with landesk.
IF @INWIN=1
;? "running WINNT deltree of LDCLIENT and LANSD"
SHELL "%comspec% /c rd /s /q c:\ldclient"
SHELL "%comspec% /c rd /s /q c:\lansd"
ELSE
;? "running Win95 deltree of LDCLIENT and LANSD"
SHELL "%comspec% /c deltree /y c:\ldclient"
SHELL "%comspec% /c deltree /y c:\lansd"
ENDIF
;******** This is to remove the "CE" MIF files from the "NOIDMIFS" directory on the local PC
SHELL "%comspec% /c @LSERVER\NETLOGON\delmifs.bat"
; ***************** Now the script will install SMS **********************
;? "about to run SMSLS.bat"
COLOR n/+b
IF @INWIN=1
SHELL "CMD /C @LSERVER\NETLOGON\SMSLS.BAT"
$SMSKEY = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Client"
IF $SMSKEY = 0
; 0 means the SMS client was found and CE should run
; SHELL "CMD /C @LSERVER\NETLOGON\CERUN.BAT"
;? "Running CE Inventory"
;sleep 3
ENDIF
ELSE
SHELL "%comspec% /c @LSERVER\NETLOGON\SMSLS.BAT"
$SMSKEY = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\client"
IF $SMSKEY = 0
;? "If the above number = 0, Then SMS was found and CE is about to run"
; 0 means subkey was found
;SHELL "@LSERVER\NETLOGON\CERUN.BAT"
;? "Running CE Inventory"
ENDIF
ENDIF
:done
Joseph L. Poandl
MCSE 2000