AdBlock.ini auto updater

Iron Forum for english speaking people

jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

whatisinternet wrote:
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
I don't get it, i really don't. I just copied that text and replaced the default text in the updater page, and it didn't work. i have tried Ironusers text too and no go. i even opened up the properties and click advanced to make sure i have full administrative, (read-write...etc) control over the adblock.ini folder and i do. I even changed it so it can be written to, and it already was able to anyway. i clicked on the list of names that have control over that folder,(system....etc) and i have full control. i will break down exactly what I'm doing.

I download the updater file from this site, i extract the update folder to desktop, i click start>startup and open that folder, it's an empty screen so I drag the update folder into the start-up folder and click save But before that i delete the default source and destination entries to what you guys are using, being careful so that every line is located in the same exact position it was originally in. I even open msconfig to verify it's in the startup folder and the box is checked so it will work. i reboot and i get the pop-up screen with the update text, but it doesn't update.

I think somebody mentioned it shows the date, but mine shows no date at all. no previous versions or anything. Oh yeah, in the srware Iron folder, it just says adblock, w/o the extention .ini. And i have the windows set to view details. It says it's a configuration folder, but the path in the adblock properties is an .ini file type. i even copied the full path when i dove deep enough into the advanced properties of the adblock folder, and that didn't work either.

So i will just manually update it once a week unless someone can point out something I'm doing wrong. Also i can get any "use as administrator" options to install that folder when i right click on it. It just says extract. I'm using winrar.
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

C'mon srware guys, you had the edit function working for a very short time, now it gone and i have to make a new post. I just wanted to mention that i tried putting the updater folder in the Iron folder also, besides the start-up folder and it still doesn't do it.
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

OK jazluvr, just for kicks and giggles, open Windows file explorer (my computer, whatever), and PATH out to the folder that you have Iron installed in.
Once there, HIGHLIGHT the location in the File Explorer Address bar(I don't know what it is called on Vista or Win7) and THEN RIGHT CLICK COPY.
[It should look something like this. "C:\Program Files\SRware Iron" Maybe NOT EXACTLY, but near to that without the quotes]

PASTE that COPIED file Explorer address in a post here. I will attempt to put it in the VBS script file , and then I'll paste the whole damned thing back and you can paste it in the copy you have and hope it finally works. PLEASE!!! MAKE A COPY OF THE VBS SCRIPT BEFORE DOING ANY EDITING!!
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

srware path screenshot.jpg
I'll do better than that, I'll take a screenshot of the path and folder. Thanks ironuser!
You do not have the required permissions to view the files attached to this post.
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

DO NOT OVERWRITE YOUR CURRENT VERSION!!!! Make a copy of it BEFORE you do anything else.
You should probably take the copy out of your StartUp folder for the meantime.

Then COPY and PASTE this code (click the Select All in the code box below)in a Notepad or Wordpad document and save it to your desktop as "adblock_update.vbs" without the quotes.
Once there, double click it. It should save the current version of the "source" file to the SRWare Iron folder.

NOTE>Some where in your Windows system settings, there should be a way to show the file extensions. Probably in the Control Panel>Folder Options. I'm not familiar with Vista or Win7, so you'll need to find it or ask in a Windows forum if it can be done.

Code: Select all

option explicit

' -----------------------------------------------------------------------------
' PARAMETERS
' -----------------------------------------------------------------------------
const source = "https://secure.fanboy.co.nz/iron/complete/adblock.ini"
const destination = "C:\Program Files (x86)\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
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

I think you can show file extensions in the File Manager by finding your Folder Options panel and DE-SELECTING the one labeled 'Hide extensions for known file types'. That is what it is in WinXP and I can't imagine MS has change it all that much. Don't forget to tell it top apply to all folders.
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

DO NOT OVERWRITE YOUR CURRENT VERSION!!!! Make a copy of it BEFORE you do anything else.
You should probably take the copy out of your StartUp folder for the meantime.

Then COPY and PASTE this code (click the Select All in the code box below)in a Notepad or Wordpad document and save it to your desktop as "adblock_update.vbs" without the quotes.
Once there, double click it. It should save the current version of the "source" file to the SRWare Iron folder.

NOTE>Some where in your Windows system settings, there should be a way to show the file extensions. Probably in the Control Panel>Folder Options. I'm not familiar with Vista or Win7, so you'll need to find it or ask in a Windows forum if it can be done.
---------
I think you can show file extensions in the File Manager by finding your Folder Options panel and DE-SELECTING the one labeled 'Hide extensions for known file types'. That is what it is in WinXP and I can't imagine MS has change it all that much. Don't forget to tell it top apply to all folders.
-----------------------------------
Well, so much for that. I did it exactly as you told me, and i SAVED A COPY of the original adblock.ini file before doing anything.
Then i found the "hide extention types" and unchecked that so all file types show their extentions, and adblock is now adblock.ini in the iron folder. So i highlighted all your text and saved it as adblock_update.vbs, saved it to desktop, and double clicked it. I checked it in the startup folder and tbh, now that i think about it, all that changed was that i could now see the extention, "vbs". So forgetting that momentarily, i thought, yay, it works! so i checked the iron directory for the updated version, and it shows the 12th. It didn't work.

By the way, i can't remove to adblock folder out and update it if there is no folder to update! I don't understand your logic in this. I tried this after my first attempt and it didn't replace it, like i thought it might. I have noticed something. If i take out the adblock original folder, and completely replace it with a fresh copy of fanboys adblock list. Iron won't start. But if i leave that original folder in there i can overwrite it.

I don't know what's going on, I'm following everyones directions to the letter, and it looks like it should work, but it doesn't. I'm really tired of fighting with this dam thing and i need a break. I will just manually update once a week and from time to time, when i find the patience, i will fool around with it, and see if i can find what's wrong.

Meanwhile, i want to thank you very much for your time, your patience and working with me to try to get this to work. You guys are great...you really are. But i gotta give it a break.
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

A couple of more things before you do the manual updates.
1- What adblock folder are you taking about?
jazluvr wrote: By the way, i can't remove to adblock folder out and update it if there is no folder to update! I don't understand your logic in this. I tried this after my first attempt and it didn't replace it, like i thought it might. I have noticed something. If i take out the adblock original folder, and completely replace it with a fresh copy of fanboys adblock list. Iron won't start. But if i leave that original folder in there i can overwrite it
My Iron install does not have an adblock folder!
Where is 'my logic' regarding an adblock folder?
As far as I know there should NOT be an adblock folder, unless you installed one of the adblock extensions.
2- Do you HAVE an ad blocking extension installed in your Iron?

3- do a search on adblock.ini now that you see the extensions, and post a screen shot of the results panel.
jazluvr
Posts: 129
Joined: Sun Sep 05, 2010 5:03 pm

Re: AdBlock.ini auto updater

Post by jazluvr »

ironuser wrote:A couple of more things before you do the manual updates.
1- What adblock folder are you taking about?
jazluvr wrote: By the way, i can't remove to adblock folder out and update it if there is no folder to update! I don't understand your logic in this. I tried this after my first attempt and it didn't replace it, like i thought it might. I have noticed something. If i take out the adblock original folder, and completely replace it with a fresh copy of fanboys adblock list. Iron won't start. But if i leave that original folder in there i can overwrite it
My Iron install does not have an adblock folder!
Where is 'my logic' regarding an adblock folder?
As far as I know there should NOT be an adblock folder, unless you installed one of the adblock extensions.
2- Do you HAVE an ad blocking extension installed in your Iron?

3- do a search on adblock.ini now that you see the extensions, and post a screen shot of the results panel.
I did a search and 4 folders came up. i have just updated and saved a copy of the last fanboy list update to desktop, and i have the .vbs dl folder saved (just so i don't have to keep dl it if something went wrong) it's also in my startup folder, i have a copy saved in my document folder, (the one you told me to save before i did anything, and the one in the iron folder.

And i told you before, Iron will NOT start w/o the adblock folder in there. You yourself said Iron original adblock list is old and that's why we update it. 2. How can you update something that doesn't exist? I told you it didn't work when i took out the folder and followed your directions, so then i tried putting the original folder back, and that did work.

I did intall googles adblocker before, but uninstalled it completely with ccleaner and in safe mode and the folder in there is the original one that came with the browser. I don't know if your iron install came with it's own adblocker, but mine did, And no, i have NO adblock extensions. the only thing i have is an autamatic configuration script that arflech posted on my lan settings...http://www.srware.net/forum/viewtopic.p ... 2&start=10 from peter Lowe's adservers.

I have no extensions at all, i just checked. None...not one.
ironuser
Posts: 388
Joined: Mon Feb 01, 2010 12:29 am

Re: AdBlock.ini auto updater

Post by ironuser »

OK, I think I understand now(I hope anyway). Folders have the yellow file folder icon. Files have different icons depending on what they are. Most configuration files have an icon that looks like a piece of paper with a small gear on the right side(on my WinXP anyway).
Yous looks to be the paper with a blue gear.

The image you posted did not have an adblock 'folder''. It had the adblock configuration file(adblock.ini).

My Iron install came with a blank adblock.ini FILE. I had to populate it with my own sites, OR find and use those from someone else. Easier to use fanboy's file, than create my own list of sites to exclude.
Why yours is not working I do not know. It should work If all the paths in the adblock_update.vbs FILE are correct, and there have been only the edits to the paths between the dashed lines at top.
Why Iron won't start without the adblock.ini file is another mystery. Try taking everything out of the one in the install folder and leave it blank. You may want to remove the one form your startup as well, as it may be causing a conflict.
Otherwise, I am at a loss for what to do next to get the updater working for you.
Post Reply