Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Vagrant Can Fail to Update Hosts on Windows 10 #42

Open
mikeschinkel opened this issue Apr 17, 2016 · 6 comments
Open

Vagrant Can Fail to Update Hosts on Windows 10 #42

mikeschinkel opened this issue Apr 17, 2016 · 6 comments
Assignees
Milestone

Comments

@mikeschinkel
Copy link
Member

mikeschinkel commented Apr 17, 2016

Jayzanarak ProgrammerLoso contacted me via Facebook Messenger with Vagrant Box install problem where Hosts Updater could not update the hosts file on Windows 10. See screenshot.

win10-hosts-update-fail

I provided him these links and they gave him enough info to solve his problem, but he did not explain to me how he solved it (he had to leave for work that moment):

I know that @sarutole tested it on Windows 10 but I assume that he had already made a modification to his Windows box to enable editing of his hosts file long before testing our box.

In order to be true to our (my?) claims that WPLib Box is the EASIEST way to setup a professional WordPress local development environment we need to solve this problem or at least change the documentation so that anyone who follows our quickstart will not run into this problem.

@mikeschinkel
Copy link
Member Author

Jayzanarak says this is how he resolved the issue:

hosts-permissions

I assume this is just something we will need to document? I assume there is no way to make it easier for the user to do this? (Or can we have a script that would pop this dialog up for them to make the changes, or something else?)

@sarutole
Copy link

sarutole commented Apr 17, 2016

We might want to switch from HostsUpdater to HostsManager, because the latter has a way to show a UAC prompt:

"If hostmanager detects that it cannot overwrite the file, it will attempt to do so with elevated privileges, causing the UAC prompt to appear."

see https://github.com/devopsgroup-io/vagrant-hostmanager#user-content-windows-support

@mikeschinkel mikeschinkel changed the title Vagrant Fails to Update Hosts on Windows 10 Vagrant Can Fail to Update Hosts on Windows 10 Apr 22, 2016
@clubdeuce clubdeuce modified the milestones: 0.10.7, 0.10.6 Apr 26, 2016
@clubdeuce
Copy link
Contributor

@mikeschinkel @sarutole What is the status of this? This issue is currently slated for 0.10.7. Should we punt to 0.10.8?

@clubdeuce clubdeuce modified the milestones: Future, 0.10.7 May 31, 2016
@unilobo
Copy link

unilobo commented Mar 13, 2017

On a windows 10 box I do not have the option to change the permission of the hosts file. I get the same problem with both HostsUpdater and HostsManager.

Solution is to edit the file manually.

@mikeschinkel
Copy link
Member Author

@unilobo Thanks for the input.

@cgsmith
Copy link

cgsmith commented Mar 30, 2018

The release 1.1.1 of vagrant-hostsupdater should escalate the UAC if necessary now. Let me know if it doesn't and I can test further.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants