Separate launcher batch file so hosts file does not need editing.

This commit is contained in:
Naval Bhandari
2021-03-26 22:09:07 +00:00
parent d84e82c720
commit 6e62bddd3c
3 changed files with 22 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ zoffline can be installed on the same machine as Zwift or another local machine.
* Append this line: ``<zoffline ip> us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com``
<br />(Where ``<zoffline ip>`` is the ip address of the machine running zoffline. If
it's running on the same machine as Zwift, use ``127.0.0.1`` as the ip.)
* If you have the helper scripts, open the __ip_address.txt__ file and change it to the zwift server ip. Launch the __launch.bat__ script as admin to start Zwift. This way, if you use the normal Zwift launcher, it'll go to Zwift's servers, and use this as a standalone launcher.
Why: We need to redirect Zwift to use zoffline and convince Windows and Zwift to
accept zoffline's self signed certificates for Zwift's domain names. Feel free

1
scripts/ip_address.txt Normal file
View File

@@ -0,0 +1 @@
127.0.0.1

20
scripts/launch.bat Normal file
View File

@@ -0,0 +1,20 @@
SET hostspath=%windir%\System32\drivers\etc\hosts
SET tmp_host=%windir%\temp\hosts
@ECHO Moving host file to tmp location...
COPY %hostspath% %tmp_host% /y >nul
SET/p ip_address=<%~dp0\ip_address.txt
ECHO .>>%hostspath%
ECHO %ip_address% us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com >> %hostspath%
START /d "C:\Program Files (x86)\Zwift" ZwiftLauncher.exe
PAUSE
@ECHO Moving host file back...
COPY %tmp_host% %hostspath% /y >nul