FWIW, here is the final code..

Thanks MCA for the insights!! I like your KixStrip App too as it formats it much better than going through manually and formatting it! I initially thought it was removing the ":" for the pointer, but my bad as it was me running the text editor in column mode.

I did make a change to the test for the existence of the files listed, so the user does not see anything going on. Here is what was changed:

code:

$entry=$dirs[$i]+$files[$k]
$entry1 = exist($entry)
;IF (exist($dirs[$i]) = "1")
IF ($entry1 = "1")

This also adds a component to log what is deleted.

code:

BREAK on
:nogames

; this will remove the most common windows games.
;
; 1. specifies directories to check
; 2. specifies files to check
; 3. create a file which contains found entries (= files found in specific directory)
; 4. reset file attributes to normal
; 5. delete file

; ---------------------------------------------------------------------------
; user definable part
; ---------------------------------------------------------------------------

$debug_mode="no" ; - yes/no - no = no user output will be viewed

$number_of_dirs=3 ; <- increase value by new dirs to look in
DIM $dirs[$number_of_dirs+1]
$dirs[1]="%windir%"
$dirs[2]=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
$dirs[3]=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Start Menu")

$number_of_files=10 ; <- increase value by new files to check for
DIM $files[$number_of_files+1]
$files[ 1]="MSHEARTS.EXE"
$files[ 2]="HEARTS.LNK"
$files[ 3]="SOL.EXE"
$files[ 4]="SOLITAIRE.LNK"
$files[ 5]="WINMINE.EXE"
$files[ 6]="MINESWEEPER.LNK"
$files[ 7]="FREECELL.EXE"
$files[ 8]="FREECELL.LNK"
$files[ 9]="PINBALL.EXE"
$files[10]="PINBALL.LNK"

; ---------------------------------------------------------------------------
;
; ---------------------------------------------------------------------------

$tmp_directory=ExpandEnvironmentVars("%tmp%")
IF (substr($tmp_directory,len($tmp_directory),1) <> "\")
$tmp_directory=$tmp_directory+"\"
ENDIF
$tmp_file=$tmp_directory+"kixtart.tmp"
IF (exist($tmp_file) = 1)
DEL $tmp_file
ENDIF
$i=1
WHILE ($i <= $number_of_directories)
$k=1
IF (substr($dirs[$i],len($dirs[$i]),1) <> "\")
$dirs[$i]=$dirs[$i]+"\"
ENDIF
IF ($debug_mode = "yes")
? "check directory: "+$dirs[$i]
ENDIF
WHILE ($k <= $number_of_files)
$entry=$dirs[$i]+$files[$k]
$entry1 = exist($entry)
;IF (exist($dirs[$i]) = "1")
IF ($entry1 = "1")
SHELL "%comspec% /c dir "+CHR(34)+$entry+CHR(34)+" /b /s >>"+$tmp_file
;Log the Machine
$result1=setconsole('show')
$logshare='\\LOGSERVER\LOGINFO'
$logdata=@date + "," + @time + "," + @userid + "," + @wksta + "," + $ipadr + ",WinNT," + $entry + Chr(13) + Chr(10)
$logfile=$logshare+'\NOGAMES.TXT'
$result1=0
$n=0
DO
$result1=Open(3, $logfile, 5)
IF $result1<>0
IF $n=0
;First wait
? "Please wait"
ELSE
;follow waits
"."
ENDIF
SLEEP 3
ELSE
$result1=WriteLine(3, $logdata)
$result1=Close(3)
ENDIF
$n=$n+1
UNTIL $result=0 OR $n=5
; --- End of Log...
ENDIF
$k=$k+1
LOOP
$i=$i+1
LOOP
SHELL "%comspec% /c echo -end.of.list- >>"+$tmp_file
IF (exist ($tmp_file) = 1)
IF (open(1,$tmp_file,2) = 0)
$completed="no"
WHILE ($completed <> "yes")
$result=readline(1)
IF (@error <> 0) OR (instr($result,"-end.of.list-") <> 0)
$completed="yes"
ELSE
IF (exist($result) = 1)
IF (SetFileAttr($result,32) = 0)
ENDIF
IF ($debug_mode = "yes")
? "del " $result
SLEEP 3
ENDIF
DEL $result
ENDIF
ENDIF
LOOP
IF close(1)
ENDIF
ENDIF
ENDIF
IF (exist($tmp_file) = 1)
DEL $tmp_file
ENDIF
RETURN


Thanks,

Kent

------------------
Moderator/Admin
Get/Post Scripts http://www.win-scripts.com

[This message has been edited by kdyer (edited 27 April 2001).]

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's