AdBlock.ini auto updater

Iron Forum for english speaking people

Scream81
Posts: 25
Joined: Thu Jun 10, 2010 4:27 pm

Re: AdBlock.ini auto updater

Post by Scream81 »

jazluvr wrote:
ironuser wrote:Did you search your system to see if it put the adblock.ini somewhere else?
Did you make sure to change the lines that point to your Iron install folder?

Code: Select all

' -----------------------------------------------------------------------------
' PARAMETERS
' -----------------------------------------------------------------------------
const source = "http://fanboy.co.nz/adblock/iron/adblock.ini"
const destination = "C:\Program Files (x86)\SRWare Iron\adblock.ini"  
' -----------------------------------------------------------------------------
The 'const destination' path needs to be absolutely right!!!
Yes, and yes. I wouldn't get the pop-up screen that says it auto-updated if it was in the wrong folder.....
Well maybe there is the problem...you would sure also get a pop-up when you download it to a wrong folder, it just informs you about the version, not if its in the right place. so please check again if your destination is your installation path of SRWare Iron.
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

Scream81 wrote:
jazluvr wrote:
ironuser wrote:Did you search your system to see if it put the adblock.ini somewhere else?
Did you make sure to change the lines that point to your Iron install folder?

Code: Select all

' -----------------------------------------------------------------------------
' PARAMETERS
' -----------------------------------------------------------------------------
const source = "http://fanboy.co.nz/adblock/iron/adblock.ini"
const destination = "C:\Program Files (x86)\SRWare Iron\adblock.ini"  
' -----------------------------------------------------------------------------
The 'const destination' path needs to be absolutely right!!!
Yes, and yes. I wouldn't get the pop-up screen that says it auto-updated if it was in the wrong folder.....
Well maybe there is the problem...you would sure also get a pop-up when you download it to a wrong folder, it just informs you about the version, not if its in the right place. so please check again if your destination is your installation path of SRWare Iron.
Ok, i tried 5 times to get this to work and it won't. The pop-up notification doesn't say which version, for one thing, and i also tried to change the properties of the original adblock folder from "read only", thinking that's maybe preventing anything from writing to it, but nope. I looked in the "properties" folder for the original adblock path, just to make sure i got it right, so i don't know what the hell else to do. It just doesn't work. i even tried uninstall it and re-install it, i get the pop-up, but it doesn't update.

Can i bother you to post a step by step manual to get his to work? I'm at my wits end here.
Scream81
Posts: 25
Joined: Thu Jun 10, 2010 4:27 pm

Re: AdBlock.ini auto updater

Post by Scream81 »

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..
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

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
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

i mean const source = "C:\Program Files\SRWare Iron\adblock.ini"
const destination = "C:\Program Files(x86)\SRWare Iron\adblock.ini"

Not const source = "C:\Program Files\SRWare Iron(86)\adblock.ini"
const destination = "C:\Program Files\SRWare Iron\adblock.ini"
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

jazluvr wrote:
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"
' -----------------------------------------------------------------------------
The 'const source in that code CAN'T BE on your hard drive. It NEEDS to be this

-----------------------------------------------------------------------------
const source = "https://secure.fanboy.co.nz/iron/complete/adblock.ini"
const destination = "C:\Program Files\SRWare Iron\adblock.ini"
' -----------------------------------------------------------------------------
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

jazluvr, I usually update the file once a week manually. But I decided to unzip the archive and change the source and destinatin paths.
This is what it is on MY MACHINE. And it works, I've verified it three days in a row now.

Code: Select all

option explicit

' -----------------------------------------------------------------------------
' PARAMETERS
' -----------------------------------------------------------------------------
const source = "https://secure.fanboy.co.nz/iron/complete/adblock.ini"
const destination = "C:\Program Files\SRware-Iron-Stable\SRWare Iron\adblock.ini"
' -----------------------------------------------------------------------------
You are probably doing some small thing wrong, or maybe a big thing, I don't know. I can't see what is happening except what you post here.
Scream81
Posts: 25
Joined: Thu Jun 10, 2010 4:27 pm

Re: AdBlock.ini auto updater

Post by Scream81 »

jazluvr wrote: 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"
' -----------------------------------------------------------------------------
const source should be the WEB LINK to the List you want to download!!! for me its:

const source = "http://fanboy.co.nz/adblock/iron/adblock.ini"

From where should it update if you dont give it the internet link?

and const destination should be Your Install path, I don'T know which one of these two...with or without (86)??? you have to know that.
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

Of course i made a mistake and corrected it. i was copying and pasting different stuff and modifying the text trying to get the dam thing to work. And even with that text you post Ironuser, By the way, i did go right to fanboys site and changed the text to exactly what you have, https...etc, and it doesn't work. I give up. I'll just update that dam thing myself every few days.

Thanks for your patience and help you guys. I do appreciate it.
whatisinternet
Posts: 2
Joined: Fri Oct 08, 2010 2:25 pm

Re: AdBlock.ini auto updater

Post by whatisinternet »

jazluvr wrote:Of course i made a mistake and corrected it. i was copying and pasting different stuff and modifying the text trying to get the dam thing to work. And even with that text you post Ironuser, By the way, i did go right to fanboys site and changed the text to exactly what you have, https...etc, and it doesn't work. I give up. I'll just update that dam thing myself every few days.

Thanks for your patience and help you guys. I do appreciate it.
I have same problem as you but it works now, found out it was typed in the wrong destination folder :oops: I'm using windows 7 64bit and this is my settings:

' -----------------------------------------------------------------------------
' PARAMETERS
' -----------------------------------------------------------------------------
const source = "https://secure.fanboy.co.nz/iron/adblock.ini"
const destination = "C:\Program Files (x86)\SRWare Iron\adblock.ini"
' -----------------------------------------------------------------------------

Thx for help guys this is great script
Post Reply