Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

HOSTS file modification

- - - - -

  • This topic is locked This topic is locked
15 replies to this topic

#1
CodeMe

CodeMe
  • Banned
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Do you specifically need the user to say "yes" ? Because if not, then it'd be simple to directly add what you want, into the host file.

But if you do want user to say yes, this will do the task you want, copy/paste into notepad, and save as .BAT:

@echo off
TITLE Modifying your HOSTS file
COLOR 85
ECHO.


:LOOP
SET Choice=
SET /P Choice="Do you want to modify HOSTS file ? (Y/N)"

IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%

ECHO.
IF /I '%Choice%'=='Y' GOTO ACCEPTED
IF /I '%Choice%'=='N' GOTO REJECTED
ECHO Please type Y (for Yes) or N (for No) to proceed!
ECHO.
GOTO Loop


:REJECTED
ECHO Your HOSTS file was left unchanged >> %systemroot%\Temp\yourinstall.log
ECHO Finished.
GOTO END

:ACCEPTED
ECHO Carrying out requested modifications to your HOSTS file
echo 127.0.0.1   local host >> %WinDir%\system32\drivers\etc\hosts
ECHO Finished.

GOTO END

:END
ECHO.
EXIT

Its quite self-explanatory. While the rest of the command-line script will do your yes/no part, the below line is what does the actual modification.
echo 127.0.0.1   local host >> %WinDir%\system32\drivers\etc\hosts
That is, you can "echo" whatever line you want into the HOSTS file, using the double-forward symbol. The location of the hosts file above, is given for win2k/XP/2k3. For win95/98/ME, its located at a different place.



Hi there this script you did... could it be modded to Delete lines from the HOST FILE Normally it's just one of these lines. But i need it to look for all 3

# 127.0.0.1 www.blah blah blah.org 
# 127.0.0.1 blah blah blah.org
# 127.0.0.1 update blah blah blah.org

And Delete all 3 And Nothing else or just one of the lines Normally the top Line..
It's a Game Launcher & if any other Launchers are used this new Launcher will Give an error " Cannot connect to remote server " Until the one or the 3 lines are deleted..


I thank you in advance to anyone that can help. Am new to writing Scripts & ,bat files or exe

P.S I use Windows 8 Pro .. but it never give me the option when i joined :)

Do i have to add
DELHOST  # 127.0.0.1 www.blah blah blah.org 
DELHOST  # 127.0.0.1 blah blah blah.org
DELHOST  # 127.0.0.1 update blah blah blah.org[


In Some place in the bat file i make.. please can some one help. i'm so new at bat & exe files
you can still see the puppy fat round my eyes. lol

We can't play the game with out manually editing the host a few times a day.. & we wish to just run a bat script to do it for us to save time..

Ok not sure were i'm going wrong but please can some one help me..
I modded the script above but it still don't delete the lines...

i can make the script add the lines but not delete them :(

here is how i modded it

@echo off
TITLE Modifying your HOSTS file
COLOR 85
ECHO.


:LOOP
SET Choice=
SET /P Choice="Do you want to modify HOSTS file ? (Y/N)"

IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%

ECHO.
IF /I '%Choice%'=='Y' GOTO ACCEPTED
IF /I '%Choice%'=='N' GOTO REJECTED
ECHO Please type Y (for Yes) or N (for No) to proceed!
ECHO.
GOTO Loop


:REJECTED
ECHO Your HOSTS file was left unchanged >> %systemroot%\Temp\yourinstall.log
ECHO Finished.
GOTO END

:ACCEPTED  ( HERE BELOW IS WHAT I ADDED )
ECHO Carrying out requested modifications to your HOSTS file
delhost 127.0.0.1 www.etcetc.org >> %WinDir%\system32\drivers\etc\hosts        << I ADDED THIS LINE 
delhost 127.0.0.1 etc etc.org >> %WinDir%\system32\drivers\etc\hosts     		<< I ADDED THIS LINE 
delhost 127.0.0.1 update.etcetc.org >> %WinDir%\system32\drivers\etc\hosts 	<< I ADDED THIS LINE  
ECHO Finished.

GOTO END

:END
ECHO.
EXIT

thank you so much people in advance

Please i'm keen to learn what i can. i know it's a simple line that should be able to be goggled.. but i always come up with power shell & Linux scripts
or scripts to add lines to hosts
Also most people scream on about why there not using a DNS server.. i don't get it, why can't they just answer the question for these people instead of telling them how to run there systems lol


Anyway Thank you ....:)


Merry Christmas everyone also.. i wish you all the very best.. Gary (From Blackburn)

Edited by Yzöwl, 17 December 2012 - 09:45 AM.



How to remove advertisement from MSFN

#2
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,078 posts
  • OS:none specified
  • Country: Country Flag
Maybe you are focusing to the specifics and not to the generic.
What you want to do, which is "How do I remove lines from a HOST file?" is a sub-set of the generic "How do I remove lines from a plain text file?".
The latter has TWO different answers:
  • there is NO provision without using third party tools to delete lines from a plain text file
  • what you can do instead is to re-write the text file omitting the lines that you do not want

Typically this can be done using a FOR loop and either the FIND or FINDSTR commands.

FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"') DO ECHO %%A
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"^|FIND /V "www.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts1"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts1"^|FIND /V "etc etc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts2"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts2"^|FIND /V "update.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts3"
NOTEPAD "%WinDir%\system32\drivers\etc\hosts3"
Within limits, you can use more FIND /V on the same command in the FOR loop, if all you have to do is to remove three lines, you can do it in one command.

then, once you are satisfied with the result, you delete the original file and rename the temp file, like:
del "%WinDir%\system32\drivers\etc\hosts"
ren "%WinDir%\system32\drivers\etc\hosts3" hosts

Take some time on:
http://www.robvander...e.com/ntfor.php
http://www.robvander...ntfortokens.php
http://www.robvanderwoude.com/find.php
http://www.robvander...com/findstr.php

What I don't understand is if these lines (site addresses) are always three, are always the same three, etc. etc. or if you need to call the command with a parameter (the line/site address to be deleted).

jaclaz

#3
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,796 posts
  • OS:none specified
  • Country: Country Flag
I'm curious where the OP got the command "delhost 127.0.0.1 ....."? I've never heard of the batch command "delhost".

The method that jaclaz detailed above should work fine and offer any needed flexibility.

Cheers and Regards

Posted Image


#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,078 posts
  • OS:none specified
  • Country: Country Flag

I'm curious where the OP got the command "delhost 127.0.0.1 ....."? I've never heard of the batch command "delhost".


It seems to me like the result of the usual "infinite monkeys approach" that most people new to scripting tend to use initially :whistle: .
http://en.wikipedia...._monkey_theorem
obviously the probabilities to get a correct command line are much higher than re-writing all of Shakespeare's plays ;), but still they are infinitely low :ph34r: .

jaclaz

#5
CodeMe

CodeMe
  • Banned
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Maybe you are focusing to the specifics and not to the generic.
What you want to do, which is "How do I remove lines from a HOST file?" is a sub-set of the generic "How do I remove lines from a plain text file?".
The latter has TWO different answers:

  • there is NO provision without using third party tools to delete lines from a plain text file
  • what you can do instead is to re-write the text file omitting the lines that you do not want

Typically this can be done using a FOR loop and either the FIND or FINDSTR commands.

FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"') DO ECHO %%A
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"^|FIND /V "www.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts1"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts1"^|FIND /V "etc etc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts2"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts2"^|FIND /V "update.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts3"
NOTEPAD "%WinDir%\system32\drivers\etc\hosts3"
Within limits, you can use more FIND /V on the same command in the FOR loop, if all you have to do is to remove three lines, you can do it in one command.

then, once you are satisfied with the result, you delete the original file and rename the temp file, like:
del "%WinDir%\system32\drivers\etc\hosts"
ren "%WinDir%\system32\drivers\etc\hosts3" hosts

Take some time on:
http://www.robvander...e.com/ntfor.php
http://www.robvander...ntfortokens.php
http://www.robvanderwoude.com/find.php
http://www.robvander...com/findstr.php

What I don't understand is if these lines (site addresses) are always three, are always the same three, etc. etc. or if you need to call the command with a parameter (the line/site address to be deleted).

jaclaz


@jaclaz


Posted Image
Not that i don't appreciate your help & time jaclaz But you have just totally confused me to the max now.
I'm NEW to making bat files & you have gone on like i understand what i'm doing lolPosted Image


I am also Have dyslexia along with ADHD trying to concentrate on what your trying to tell me as made this project sound even harder for me now Posted Image


is there some please that can help spell it out for me & put it in layman's terms for me please Posted Image

I'm not stupid or thick just always Have always been one of them people that as to have something shown to them.
i was the same at school i had to have separate teacher.. anyway this is a little personal & Hard for me to tell people on a forum.

so i hope you understand & someone can help me.

thank you again

Gary

#6
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,078 posts
  • OS:none specified
  • Country: Country Flag
Let's make a simpler example.
Let's say that you have a directory C:\tests and in this directory you have a text file c:\tests\mytest.txt with these contents (copy and paste in a new notepad window and save as c:\tests\test.txt:
Line #1: This is first line
Line #2: this is second line
Line #3: this is third line

And let's say that you want to remove the second line, i.e. your expected result is:
Line #1: This is first line
Line #3: this is third line

There is NO command built in in the batch language NOR any tool shipped with any DOS/Windows release capable of removing a line from a text file.

Is this clear enough till now? :unsure:

There is a workaround that is to read the WHOLE contents of the file and re-writing a new file filtering out the unwanted line.

Open a command prompt window and in it type )or copy/paste):
TYPE C:\tests\mytest.txt
[ENTER]
You will see the three lines.

now try:
TYPE C:\tests\mytest.txt|FIND /V "#2"
[ENTER]

You will see your desired result, the line #2 is filtered out by the FIND /V command.

now try:
TYPE C:\tests\mytest.txt|FIND /V "#2">C:\tests\mynewtest.txt
[ENTER]

Open in Explorer the folder C:\tests\ and you will find in it a file named mynewtest.txt with the same output you before saw in the command window (i.e. the desired result).

What you have done was to "pipe" (or redirect) the output of the command TYPE to the input of FIND command and later redirected this latter's standard output to a file.

Is this clear enough? :unsure:

Besides your "dyslexia along with ADHD" troubles, you need ANYWAY to read and study the batch commands syntax and understand it if you want to write a batch file.
The given site:
http://www.robvanderwoude.com/
http://www.robvander.../batchfiles.php

contains both "basic" syntax and "advanced" one explanations, examples and what not.
Start reading, at the light of this post, these:
http://www.robvanderwoude.com/type.php
http://www.robvanderwoude.com/find.php
http://www.robvander...redirection.php

jaclaz

#7
CodeMe

CodeMe
  • Banned
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Let's make a simpler example.
Let's say that you have a directory C:\tests and in this directory you have a text file c:\tests\mytest.txt with these contents (copy and paste in a new notepad window and save as c:\tests\test.txt:

Line #1: This is first line
Line #2: this is second line
Line #3: this is third line

And let's say that you want to remove the second line, i.e. your expected result is:
Line #1: This is first line
Line #3: this is third line

There is NO command built in in the batch language NOR any tool shipped with any DOS/Windows release capable of removing a line from a text file.

Is this clear enough till now? :unsure:

There is a workaround that is to read the WHOLE contents of the file and re-writing a new file filtering out the unwanted line.

Open a command prompt window and in it type )or copy/paste):
TYPE C:\tests\mytest.txt
[ENTER]
You will see the three lines.

now try:
TYPE C:\tests\mytest.txt|FIND /V "#2"
[ENTER]

You will see your desired result, the line #2 is filtered out by the FIND /V command.

now try:
TYPE C:\tests\mytest.txt|FIND /V "#2">C:\tests\mynewtest.txt
[ENTER]

Open in Explorer the folder C:\tests\ and you will find in it a file named mynewtest.txt with the same output you before saw in the command window (i.e. the desired result).

What you have done was to "pipe" (or redirect) the output of the command TYPE to the input of FIND command and later redirected this latter's standard output to a file.

Is this clear enough? :unsure:

Besides your "dyslexia along with ADHD" troubles, you need ANYWAY to read and study the batch commands syntax and understand it if you want to write a batch file.
The given site:
http://www.robvanderwoude.com/
http://www.robvander.../batchfiles.php

contains both "basic" syntax and "advanced" one explanations, examples and what not.
Start reading, at the light of this post, these:
http://www.robvanderwoude.com/type.php
http://www.robvanderwoude.com/find.php
http://www.robvander...redirection.php

jaclaz


What I don't understand is if these lines (site addresses) are always three, are always the same three, etc. etc. or if you need to call the command with a parameter (the line/site address to be deleted).




this is going to sound funny. but i have made a game launcher ( But i can't make a simple cmd to delete 3 lines from a host file (hahahah )
for a game & others have made there own launcher also. BUT they have made it so it adds the lines so the End USER can't use anyone's else's but there's


so when people try mine they get an error " CANNOT CONNECT TO REMOTE SERVER "
So i have to tell them to Edit these 3 lines out of there HOST file.


NOW the problem is NOT everybody know where or how what & Were a HOST file is, never mind how to edit one lol


so i'm trying to make it simple for my user's. when they download my tool, there is a bat file or script
that if they get an error message they run this script & the work is done for them.


saving them the hassle & messing up there own computers..


i got it to work, but it adds 3 hosts files to the directory 1,2,3


i don't think this is the best way for simple folk to use that do not know how to edit hosts


just trying what i can to help my END USER.


P.S
i thought something so simple would of been easy.
yet i can use ArtMoney to edit my game & find addresses etc


@@@@@@@@@@@@@@@@@


Again i thank you for the links to read, this will be hard, i have always learnt via video or being shown the end result..
i know i have to over come these problems & trust me i do try.


Thank you

#8
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,078 posts
  • OS:none specified
  • Country: Country Flag

Again i thank you for the links to read, this will be hard, i have always learnt via video or being shown the end result..

In my experience I have seen people watching videos and people looking at end results, but noone ever learning or understanding anything from them (or from them alone, i.e. without additionally reading, studying, experimenting)
You can replicate the examples shown in a video alright, and a video can well be a support for learning :thumbup , but understanding principles or learning a computer language syntax from a video? :unsure:

jaclaz

#9
CodeMe

CodeMe
  • Banned
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag


Again i thank you for the links to read, this will be hard, i have always learnt via video or being shown the end result..

In my experience I have seen people watching videos and people looking at end results, but noone ever learning or understanding anything from them (or from them alone, i.e. without additionally reading, studying, experimenting)
You can replicate the examples shown in a video alright, and a video can well be a support for learning :thumbup , but understanding principles or learning a computer language syntax from a video? :unsure:

jaclaz


@jaclaz

Dude that to me is a little insensitive & Insulting. How dare you presume what i do after watching a video.
I can & Do Build computer's & repair them for a living & have my own store. & very successful store to.
I Can MOD a BIOS for my ASUS Mobo & tweak it to work better & i can repair the Mobos them self's.

All this was done by watching video's & Experimenting. this is the best way for ME to learn.
Not every one is wired the same way as every one else jaclaz , we all learn & think in our own ways.

I Can use artmoney to locate addresses in programs & TrueBug.PHP.Obfuscator as well as OLLYDBG all done by video & self learnt.
and asking questions. BUT sometimes people think we all think on the same level on these forums & we don't Sir

we get to were we are by asking questions & sometime weather you like it or not. you will have to paraphrase your reply's so for them that don't know
are able to learn & pick it up easy..


Again i thank you for you help, but it's no use leaving 4 host files in the directory this will only confuse people even more lol

i'm not having a go at you, am simply standing up for my self... Simple :)




#10
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,793 posts
  • OS:98SE
  • Country: Country Flag

Donator


Again i thank you for the links to read, this will be hard, i have always learnt via video or being shown the end result..

In my experience I have seen people watching videos and people looking at end results, but noone ever learning or understanding anything from them (or from them alone, i.e. without additionally reading, studying, experimenting)
You can replicate the examples shown in a video alright, and a video can well be a support for learning :thumbup , but understanding principles or learning a computer language syntax from a video? :unsure:

jaclaz

@jaclaz

Dude that to me is a little insensitive & Insulting. How dare you presume what i do after watching a video.
I can & Do Build computer's & repair them for a living & have my own store. & very successful store to.
I Can MOD a BIOS for my ASUS Mobo & tweak it to work better & i can repair the Mobos them self's.

All this was done by watching video's & Experimenting. this is the best way for ME to learn.
Not every one is wired the same way as every one else jaclaz , we all learn & think in our own ways. [...]

Posted Image



#11
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,078 posts
  • OS:none specified
  • Country: Country Flag

but it's no use leaving 4 host files in the directory this will only confuse people even more lol

then, once you are satisfied with the result, you delete the original file and rename the temp file, like:

del "%WinDir%\system32\drivers\etc\hosts"
ren "%WinDir%\system32\drivers\etc\hosts3" hosts


jaclaz

#12
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,530 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

@CodeMe

If you want a specific solution to 'learn from' then provide a specific question!
(I can only provide a solution if you can provide me an exact character by character copy of the entries you need to modify/delete)

The three lines you've provided us with are already commented out meaning that they are not read when the file is parsed and therefore do not need deleting!

Are you suggesting that another game developer has written HOSTS entries which effectively block your domain!

#13
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,796 posts
  • OS:none specified
  • Country: Country Flag
@CodeMe

I think that jaclaz has been very patient with you and given you all the tools you need, especially in this post:

Maybe you are focusing to the specifics and not to the generic.
What you want to do, which is "How do I remove lines from a HOST file?" is a sub-set of the generic "How do I remove lines from a plain text file?".
The latter has TWO different answers:

  • there is NO provision without using third party tools to delete lines from a plain text file
  • what you can do instead is to re-write the text file omitting the lines that you do not want

Typically this can be done using a FOR loop and either the FIND or FINDSTR commands.

FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"') DO ECHO %%A
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"^|FIND /V "www.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts1"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts1"^|FIND /V "etc etc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts2"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts2"^|FIND /V "update.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts3"
NOTEPAD "%WinDir%\system32\drivers\etc\hosts3"
Within limits, you can use more FIND /V on the same command in the FOR loop, if all you have to do is to remove three lines, you can do it in one command.

then, once you are satisfied with the result, you delete the original file and rename the temp file, like:
del "%WinDir%\system32\drivers\etc\hosts"
ren "%WinDir%\system32\drivers\etc\hosts3" hosts

Take some time on:
http://www.robvander...e.com/ntfor.php
http://www.robvander...ntfortokens.php
http://www.robvanderwoude.com/find.php
http://www.robvander...com/findstr.php

What I don't understand is if these lines (site addresses) are always three, are always the same three, etc. etc. or if you need to call the command with a parameter (the line/site address to be deleted).

jaclaz


He then went above and beyond when, at your request, he tried to put it in "layman's terms" and gave you even simpler examples to practice with:

Spoiler


The only evidence you gave that you attempted to experiment with any of the above was when you complained:

i got it to work, but it adds 3 hosts files to the directory 1,2,3


The "extra" copies of the hosts file are created primarily for your benefit to help you understand what is happening in the various parts of the process, they are not meant to be kept in your final code. After you have gone through the steps as outlined and verified that the "hosts3" file has successfully accomplished your goal of deleting the 3 offending lines, then you can compress and clean up the code into a form suitable for distribution to your users. Assuming the above code is successful, the resulting code could look something like this:

@echo off
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts"^|FIND /V "www.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts1"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts1"^|FIND /V "etc etc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts2"
FOR /F "tokens=* delims=" %%A IN ('type "%WinDir%\system32\drivers\etc\hosts2"^|FIND /V "update.etcetc.org"') DO ECHO %%A>>"%WinDir%\system32\drivers\etc\hosts3"
del "%WinDir%\system32\drivers\etc\hosts"
del "%WinDir%\system32\drivers\etc\hosts1"
del "%WinDir%\system32\drivers\etc\hosts2"
ren "%WinDir%\system32\drivers\etc\hosts3" hosts
EXIT

So you are left with the one single hosts file. I assume that this is what you were looking for?

Cheers and Regards

Posted Image


#14
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • OS:XP Pro x86
  • Country: Country Flag
@CodeMe
A simpler alternative workaround is just to provide instruction to your user to manual check the hosts (file) setting.
Ask user to copy and paste the below code in Start-->Run box and press enter to open hosts (file) in notepad.
notepad %systemroot%\system32\drivers\etc\hosts
Ask user to manual disable the 3 sites (if exists) by inserting # at the begining of the line. (since # is use for comment)

#15
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
As a side note, a script might not be a good idea as many Antivirus will protect the hosts file and won't let you modify it without at least a warning.

#16
CodeMe

CodeMe
  • Banned
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag

@CodeMe
A simpler alternative workaround is just to provide instruction to your user to manual check the hosts (file) setting.
Ask user to copy and paste the below code in Start-->Run box and press enter to open hosts (file) in notepad.

notepad %systemroot%\system32\drivers\etc\hosts
Ask user to manual disable the 3 sites (if exists) by inserting # at the begining of the line. (since # is use for comment)



@Geej

That would be a really Great idea & cool mate.. but i have people from all around the world & to translate it all into every langue's would be almost impossible.
But i thank you :)

@bphlpt

He then went above and beyond when, at your request, he tried to put it in "layman's terms" and gave you even simpler examples to practice with:


I totally agree with you on this.. But you lot may get it, i do to a point. this is a hard way for me to learn & so dam embarrassing.
I would of thought with all the times i came back that i was struggling with this, but i guess no one gathered that.

i meant no disrespect & it's simply frustration with being Dyslexic & not being able to get my point across,
i guess no one picked up on that also lol... like i said were all wired in our own Unique way & some get things better that other's. i guess i don't.

thank you anyway for your reply..


@Yzöwl


If you want a specific solution to 'learn from' then provide a specific question!
(I can only provide a solution if you can provide me an exact character by character copy of the entries you need to modify/delete)

The three lines you've provided us with are already commented out meaning that they are not read when the file is parsed and therefore do not need deleting!

Are you suggesting that another game developer has written HOSTS entries which effectively block your domain!



Yes were hmm Game hackers we make hacks to use with online games & we are in competition with each other.
so Darkteam & GZM & Zerocool all add there own little tricks
so if an end user use's one of there hacks & then use's mine hack, they get an Error message saying CONNOT CONNECT TO REMOTE SERVER
so we have to explain that people have to delete our domain from there host file then restart our hack, then they connect

i mean if there was a way to Add a file saying or names " host.allow " is that an option ? i mean if people were to add a pre-made host would this work.

I'll not be expecting much help to be honest lol not now i have mentioned we make hacks.

this is why its been soo dam frustrating for me. i'm able to make hacks but when it come's to a simple bloody host file. i just can not get my head round it or sort it
to stop other hackers adding a block to our domain. so our end user can not use our hacks unless we teach them how to edit there host
& to teach & explain this to all people around the world in so many langue's is something i just do not have time to do.
i have to concentrate on my new release..


anyway to everyone i do thank you all & wish you all the best for Xmas... all the best people :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN