dole
dole

Reputation: 433

edit the etc\hosts file

Using C or a bat file, I'm trying to edit the file hosts file from c:\Windows\System32\drivers\etc but I can;t bc it is write protected.

Can you tell me what can i do?

Upvotes: 0

Views: 1916

Answers (3)

Mujahidul Islam
Mujahidul Islam

Reputation: 563

Open the file from VS code. VS code it self will show a dialog box. Confirm it.

Upvotes: 0

pmg
pmg

Reputation: 108967

Can you tell me what can i do?

Yes. Get the Administrator password or find another way to solve your problem.

If you describe what is your problem (rather than your issue on a possible solution) maybe we can figure a different (working) solution.

Upvotes: 0

John La Rooy
John La Rooy

Reputation: 304117

The program modifying the host file needs to run as Administrator

Upvotes: 5

Related Questions