derekhe / msfs2020-map-enhancement

MSFS2020 Map Enhancement
GNU General Public License v3.0
302 stars 38 forks source link

Optional Updating & Automatically revert "host" file when closing MEH #593

Closed alanbeasy closed 7 months ago

alanbeasy commented 7 months ago

There needs to be a way to ensure that Users of the Map enhancement are not left STUCK if something happens on our system that prevents the Map Enhancement Mod from starting up AND has not reverted the "hosts" file back to its default maps. When this happens the Simulator gets STUCK loading a flight.

The Map Enhancement Mod adds entries to the "hosts" file to direct the map source away from the official MSFS maps. If the Mod is not uninstalled or updated properly or something gets messed up in MSFS, the entries in "hosts" file can cause the flight loading to "freeze" at about 75% along.

I have discovered the work around is to delete the "hosts" file. (need to be logged in as Administrator) C:\Windows\System32\drivers\etc\hosts

Or to delete the entries that were made by the Map Enhancement Mod.
Screenshot 2024-03-24 011029

Further to this, you should make updating the Map Enhancement OPTIONAL, rather than being impossible to run without updating ("this eversion is too old"). We should be able to reinstall any older version too. I had to roll back my computer to a previous System Restore point to solve a certain problem. But when I tried to open the Map Enhancement it was an older version and would not open until it was updated to the current version. In the process, the Map Enhancement install became corrupt and refused to open. I tried to start MSFS without Map Enhancement, but the Flight Simulator would not load a flight because it was still looking for the Map Enhancement. The entries in "hosts" file had not been updated.

Fortunately I have now learned about deleting the "hosts" file.

In summary, the Map Enhancement App should be set up so that turning it on before opening MSFS it adds whatever entries are required to direct the map source to the Google maps, but on shutting down or closing the App these entries automatically revert to the MSFS default..... so if the simulator is started without Map Enhancement there is no chance of getting Stuck looking for Google maps.

derekhe commented 7 months ago

Thanks for your feedback. The mod has the function when it exits it clears everything it added to hosts. BUT, when some people close windows directly without clicking "stop", the mod can't have enough time and chance to restore the hosts file and it leaves the entries in the hosts file.

alanbeasy commented 7 months ago

OK. But there are many situations where the mod may close or shut down before the user can click "stop". For example, a power outage, or a system freeze. There needs to be another way of clearing the entries in the hosts file. Like for example, a button near the "Start" which says "CLEAR HOST FILE" This needs to happen so we can fly WITHOUT the mod if the mod has shut down without warning.

I currently still have the "Backend server failed to start" problem so I cannot open the mod to "Start" & "Stop" anyway. I have made a shortcut to the "host" folder on the desktop and I have a clean "hosts" file saved on my D: drive. I can now replace the "hosts file on C: drive if the mod fails to clear the entries in the "hosts" file.

At the moment I am flying without the mod - using MSFS default Bing maps and Rolling Cache "on". I am afraid to turn on the Map Enhancement Mod to test if the "Backend server failed to start" issue has been fixed. Hopefully the "host" file entries occur only when we click "Start" in the Map Enhancement.

As I suggested, we still need to have the option of choosing to "update later" rather than the current forced update. We also need to be able to roll back or reinstall an older version after a System Restore.

On Sun, Mar 24, 2024 at 12:31 PM hesicong @.***> wrote:

Thanks for your feedback. The mod has the function when it exits it clears everything it added to hosts. BUT, when some people close windows directly without clicking "stop", the mod can't have enough time and chance to restore the hosts file and it leaves the entries in the hosts file.

— Reply to this email directly, view it on GitHub https://github.com/derekhe/msfs2020-map-enhancement/issues/593#issuecomment-2016656412, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5MHPDRFDTH7WPGFVB5DYUTYZYUFRAVCNFSM6AAAAABFEWUM3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGY2TMNBRGI . You are receiving this because you authored the thread.Message ID: @.***>