Hi again!

Thanks for replying cj & kholm!

The sad part is that I didn't get any of the suggestions to work , perhaps I did some serious BDU error?! I tried this:

code:

$sFilename = "D:\temp\test\Acrobat Assistant.lnk"

; open file for reading
$fText = VAL("&" + OLECALLFUNC(OLECREATEOBJECT("Scripting.FileSystemObject"), "OpenTextFile", "s", "$sFilename"))

; read ALL of file
$sText = OLECALLFUNC($fText, "ReadAll")

; close file
$ = OLECALLFUNC($fText, "Close")

?" the text: $sText."

IF INSTR("$sText", "AcroTray.exe") <> 0
?"AcroTray.exe were found in [$sFilename]"
ENDIF



code:

BREAK ON
$Dir = "D:\temp\test"
$Links = "$Dir" + "\*.lnk"
$Program = "AcroTray.exe" ; Include drive and path in searchstring if you can
;$Program = %WINDIR% + "vncviewer.exe" ; Include drive and path for program in searchstring, if you know it
$Found = 0

$FileName = DIR("$Links")
WHILE $FileName <> "" AND @ERROR = 0 AND $Found = 0
IF OPEN(1, "$Dir" + "\$Filename") = 0
$Content = ""
$Line = READLINE(1)
WHILE $Line AND @ERROR = 0
$Content = $Content + $Line
$Line = READLINE(1)
LOOP
$Err = CLOSE(1)
IF INSTR($Content, $Program)
?" String found in link [" + $Dir + "\" + $FileName + "]"
; DEL $Dir + "\" + $FileName
;IF @ERROR <> 0
; ?" Didn't manage to dele the link [" + $Dir + "\" + $FileName + "]"
;ENDIF
$Found = -1
ENDIF
ENDIF
DIR() ; retrieve next file
LOOP



Damn those shortcuts! cj, the output of your OLE thingie were a simple "L"! ? Wild gues, could it have something to do with me running a localized version of Win2000 (Swedish)?

[This message has been edited by masken (edited 08 May 2001).]

_________________________
The tart is out there