Xteq.SEtup Xteq.com
Har rodet lidt med prg. Xteq.com og set man kan trække kode ud. Er der en der ved om nedstående er VB ?sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History"
Sub Plugin_Initialize
End Sub
Sub Plugin_CheckData(ElementIndex)
End Sub
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
if ElementIndex=1 then
Call DoWork(false)
else
Call DoWork(true)
end if
End Sub
Sub DoWork(EraseTotally)
s=RegReadValue(sP)
sBasePath=s
if folderexists(sBasePath) then
'okay, now look for any remaing files...
Call KillDir(sBasePath,EraseTotally,false)
'done!
msginformation "History Folder contents cleared!"
else
msgerror "Unable to locate History folder - nothing done!"
end if
end Sub
Sub KillDir(DirName,EraseTotally,KillDirAlso)
iC=FileEnum(DirName & "\*.*")
for i=1 to iC
sFile=FileEnumElement(i)
'index.dat can not be erased, always locked for writing... grr..
if right(sFile,9)<>"index.dat" then
if EraseTotally then
lC=TxtOpen(sFile)
'replace contents of file
for l=1 to lC
Call TxtSetLine(l,"-")
next
'desktop.ini is special case..
if right(sFile,11)="desktop.ini" then
Call FileSetAttribute(sFile,"R-")
Call FileSetAttribute(sFile,"H-")
Call FileSetAttribute(sFile,"S-")
end if
Call TxtSave()
end if
'now kill the file
FileDelete(sFile)
end if
next
if KillDirAlso=true then
FolderDelete(DirName)
end if
End Sub
Sub Plugin_Terminate
End Sub
