Hi,
CAn someone help me with the code. This code was suggested to me by NTDOC and Howard Bullock so the level of KiXtart is way way to high for me.The idea is to desplay meesags on the screen using logon scripts every 45 days. I have windows 2000 server and clients running on windows XP SP1 and Windows 2000 SP3. Thank you all in advance 
Code:
Dim $OS, $Msg, $Answer, $RC
$OS=setOption('Explicit','off')
$OS=setOption('NoVarsInString','On')
$OS=setOption('WrapAtEOL','On')
Dim $SetCounter, $Key, $KeyValue, $Delay,$KiXtartSchedule
$Delay=3888000
$SetCounter=FileTime(@Date,@Time)
$KiXtartSchedule="HKEY_CURRENT_USER\Software\LogOnScripts\Schedule\45"
$Key=KeyExist($KiXtartSchedule)
If $Key
$KeyValue=Val(ReadValue($KiXtartScheduale,'time'))
If SetCounter > ($KeyValue+$Delay)
$Answer=MessageBox("what ever need to be said","Reminder",4180) If $Answer <>6
$Msg=MessageBox("what ever need to be said",4112)
$RC=LogOff(1)
Else
$Msg=MessageBox(What ever need to be said",64,5)
EndIf
KeyValue=WriteValue$KiXtartSchedule,'time',$SetCounter,REG_SZ) If $Answer <>6
$Msg=MessageBox("what ever need to be said",4112)
$RC=LogOff(1)
Else
$Msg=MessageBox(What ever need to be said",64,5)
EndIf
Endif
If InGroup("Domain Users")
MapDrive("F:", "jmmes", "Vol1")
MapDrive("G:", "jmmes", "mCalas")
MapDrive("H:", "jmmes", "caldata")
MapDrive("I:", "jmmes", "s6system")
MapDrive("J:", "jmmes", "winapp")
; K: Drive Mapped by OS as Home Share
MapDrive("L:", "j :Jmmes", "abas")
MapDrive("M:", "jmmes", "vol1")
MapDrive("N:", "jmmes", "netapps")
MapDrive("O:", "jmmes", "JMME-FPlan")
MapDrive("P:", "jmmes", "apps")
MapDrive("Q:", "jmmes" ,"NotesMME")
MapDrive("S:", "jmmes", "vol2")
MapDrive("T:", "jmmes", "templates")
MapDrive("Y:", "jmmes", "PWCDll")
Endif
Function MapDrive($Drive, $Server, $Share)
Dim $Drive, $Server, $Share, $shell
Color c+/n
If $Drive<>"" and $Server<>"" and $Share<>""
$LogText="Connecting $Drive to \\$Server\$Share"
? $LogText
USE $Drive /Delete /Persistent
USE $Drive "\\" + $Server + "\" + $Share
If @error=0
color g+/n
$x = " - Success"
$x
If val($DOS) >= 5
$shell=createobject("shell.application")
$shell.namespace($Drive+"\").self.name=$Share + " on '" + $Server + "'"
$shell = 0
Endif
Else
color r+/n
$x = " - Failed: Error " + @error
$x
$ErrorState=1
Endif
; Commented out logging
;WriteLog ($LogText + $x)
;WriteLog2("%temp%\MapDrive.log",$LogText + $x,1)
Color w+/n
Else
? "Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'"
; Commented out logging
;WriteLog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'")
Endif
Endfunction
Else
keyValue=WriteValue$KiXtartSchedule,'time',SetCounter,REG_SZ)
Function FlipcTime($date,$time,optional $tz)
Dim $y,$m,$d
$date = split($date,"/")
If
ubound($date) <> 2 exit(1)
Endif
$y=val($date[0]) $m=val($date[1]) $d=val($date[2])
If $m<3
$m=$m+12
$y=$y-1
Endif
$Date=$d+(153*$m-457)/5+365*$y+$y/4-$y/100+$y/400-306
$time = split($time,":")
Select
case ubound($time)=1
redim preserve $time[2]
$time[2]=0
case ubound($time)=2
case 1
exit(1)
Endselect
$time = (val($time[0])*3600)+(val($time[1])*60)+val($time[2])
flipctime=IIF($tz,(($date-719163)*86400+$time)-($tz*3600),($date-719163)*86400 + $time)
endfunction