Scream81 wrote:Hmm there is really not much to do get it to work here.
1: Search for the InstallFolder of your SRWare Iron. for me it's: " C:\Program Files\SRWare Iron\ "
2: Open the adblock_update.vbs with a texteditor. Ther you see the two files two edit...
3: edit the line: const destination = "C:\Program Files\SRWare Iron\adblock.ini" . Fill in your Installfolder and add adblock.ini .
4: save and close the texteditor, doubleclick the adblock_update.vbs . A pop-up appears where it says the first three lines of the just downloaded File:
# Fanboy's Adblock list (Iron-Chrome)
# Checksum: q9AxuNfCPnAr5E2mdJfrkg
# Updated: 11 Oct 2010
5: To check if its all right open the adblock.ini in the Installation folder and edit the first line...write something stupid there. save and close.
Double click the adblock_update.vbs and see what the popup says, and open the adblock.ini if your writing is overwritten.
If the Check was right, place the adblock_update.vbs in your Autostart folder or wherever... hope it works, there is really not more to do with it..
The popup you describe is nothing like what I'm getting...option explicit
' -----------------------------------------------------------------------------
' PARAMETERS
' -----------------------------------------------------------------------------
const source = "C:\Program Files(86)\SRWare Iron\adblock.ini"
const destination = "C:\Program Files\SRWare Iron\adblock.ini"
' -----------------------------------------------------------------------------
UpdateAdBlock source, destination
sub UpdateAdBlock(source, destination)
' download adblock.ini
GetHtmlPage source, destination
' show message
dim s : s = ReadFirstLines(destination, 3)
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.popup s, 3, "Adblock updated", 64
'MsgBox s, vbInformation, "Adblock updated"
end sub
sub GetHtmlPage (up_http, down_http)
dim xmlhttp : set xmlhttp = createobject("msxml2.xmlhttp.3.0")
xmlhttp.open "get", up_http, false
xmlhttp.send
dim fso : set fso = createobject ("scripting.filesystemobject")
dim newfile : set newfile = fso.createtextfile(down_http, true)
'and the text from the XMLHTTP response can then be written to the file:
newfile.write (xmlhttp.responseText)
'the file must then be closed:
newfile.close
set newfile = nothing
set xmlhttp = nothing
set fso = nothing
end sub
function ReadFirstLines(fileName, numberOfLines)
const wChar = "ยง"
dim res
' open text file
dim fso : set fso = createobject ("scripting.filesystemobject")
dim ts : set ts = fso.OpenTextFile(fileName)
' read the first x lines
dim x
for x = 1 to numberOfLines
res = res & ts.ReadLine & wChar
next
ts.close
set ts = Nothing
set fso = Nothing
' format output string
if len(res) > 1 then
res = left(res, len(res) - 1)
res = replace(res, wChar, vbCrlf)
end if
ReadFirstLines = res
end function