Reputation: 433
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
Reputation: 563
Open the file from VS code. VS code it self will show a dialog box. Confirm it.
Upvotes: 0
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
Reputation: 304117
The program modifying the host file needs to run as Administrator
Upvotes: 5