|
|
 |
09-03-2012, 03:31 PM
|
#1
|
|
Lifer
Join Date: Sep 2001
Location: Somewhere between hare . . . . . & their
Posts: 17,537
|
Win7: Change Host file from Dos window?
my host file has ad blockers but sometimes i need to temporarily disable it to get cashback from ordering from websites.
in WinXP, i had a simple .bat to rename the host file. then another simple .bat file to name it back.
but in Win7 it says Access is denied.
I am logged in as Admin.
i had to open Windows Explorer and click directories all the way down to get to the Host file in drivers/etc.
how can i make my .bat file work in Win7?
__________________
Quote:
Irony: The new Virgin Mary aborted the 2nd coming of Christ in 2000
|
Degree: Masters in Viagra (Summa Cum Loude), Job: Porn Star, Salary: YEAH, BABY!
← Also has BS in Asian Massage studies
You know you're boring when God falls asleep on you
|
|
|
09-03-2012, 04:31 PM
|
#2
|
|
Diamond Member
Join Date: Jul 2006
Location: Midwest USA
Posts: 5,701
|
run it as administrator?
__________________
i7-3770, Intel DZ77SL-50K, VisionTek HD 7850, Dell 2707WFP, X25-M, X-Fi * PC Gamer Since 1991 *
|
|
|
09-03-2012, 05:20 PM
|
#3
|
|
Elite Member
Join Date: Sep 2001
Posts: 30,636
|
Use a better browser with an ad-block extension that can be easily toggled on and off?
|
|
|
09-03-2012, 07:20 PM
|
#4
|
|
Senior Member
Join Date: Apr 2012
Posts: 405
|
haven't tried it, but give is a go:
give "everyone" permission on the file to "full control"
Edit,
ofc, the file that needs the permission modified is the hosts file, and not the bat file.
|
|
|
09-03-2012, 07:36 PM
|
#5
|
|
Elite Member
Join Date: Sep 2001
Posts: 30,636
|
Quote:
Originally Posted by hhhd1
haven't tried it, but give is a go:
give "everyone" permission on the file to "full control"
Edit,
ofc, the file that needs the permission modified is the hosts file, and not the bat file.
|
Since he's doing renames the object that needs permission is the parent directory, not the file itself.
|
|
|
09-03-2012, 07:39 PM
|
#6
|
|
Platinum Member
Join Date: Nov 2009
Location: Southern California
Posts: 2,138
|
Quote:
Originally Posted by JEDI
how can i make my .bat file work in Win7?
|
Right-click on it and run as Administrator. Alternatively, you should be able to set a compatibility flag in the .bat file's properties that will automatically request privilege elevation.
Quote:
Originally Posted by hhhd1
haven't tried it, but give is a go:
give "everyone" permission on the file to "full control"
Edit,
ofc, the file that needs the permission modified is the hosts file, and not the bat file.
|
Please don't do this.
|
|
|
09-04-2012, 01:40 PM
|
#7
|
|
ASUS Support
Join Date: Jul 2012
Posts: 457
|
Quote:
Originally Posted by Nothinman
Use a better browser with an ad-block extension that can be easily toggled on and off?
|
I have to agree. The HOSTS file is kind of a poor man's DNS, and it's an extremely clumsy and ineffectual tool for blocking ads. On an Android device you can at least argue that it is very battery friendly, but on a computer capable of running Windows you don't even have that somewhat flimsy excuse.
|
|
|
09-04-2012, 04:07 PM
|
#8
|
|
Lifer
Join Date: Sep 2001
Location: Somewhere between hare . . . . . & their
Posts: 17,537
|
Quote:
Originally Posted by Nothinman
Use a better browser with an ad-block extension that can be easily toggled on and off?
|
which broswer? chrome?
__________________
Quote:
Irony: The new Virgin Mary aborted the 2nd coming of Christ in 2000
|
Degree: Masters in Viagra (Summa Cum Loude), Job: Porn Star, Salary: YEAH, BABY!
← Also has BS in Asian Massage studies
You know you're boring when God falls asleep on you
|
|
|
09-04-2012, 05:46 PM
|
#9
|
|
ASUS Support
Join Date: Jul 2012
Posts: 457
|
Quote:
Originally Posted by JEDI
which broswer? chrome?
|
Firefox and Adblock Plus is the best solution from a technical standpoint. The Gecko rendering engine can literally be interrupted by extensions, so AdBlock Plus can literally prevent the browser from even downloading ads. The extension can also alter the layout of the page, to let you reclaim the space used by the ads. So they aren't just hidden, it's as if they never even existed.
Chrome has a version of AdBlock Plus, but it's rather neutered in comparison because extensions cannot interact with the rendering engine in the same way they can on Firefox. Generally the page is downloaded, rendered, and then filtered through the extension. So you might see the page with ads, then it flashes and reloads without the ads. Supposedly Google was very interested in having a version of NoScript for Chrome way back when, but so far Google hasn't really made any serious efforts to add the needed functionality. The same basic functionality needed for AdBlock Plus to work most efficiently.
|
|
|
09-04-2012, 07:55 PM
|
#10
|
|
Elite Member
Join Date: Sep 2001
Posts: 30,636
|
Quote:
Originally Posted by JEDI
which broswer? chrome?
|
I personally use Chrome with Ad-block simply because I like it better. But the issues that cl-scott mention are something you should consider. Where the FF extension will block the entire request to an ad, Chrome's Ad-block will download and remove it after the fact.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:40 AM.
|