Skip to content

Commit

Permalink
Update the readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
sqc1999 committed Jan 9, 2017
1 parent 4fab4b0 commit fc03107
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ An offline installer for Bash on Windows.
- **Install any version of Ubuntu!**

# How to use
1. Download a Ubuntu pre-installed disk image.
1. Prepare an Ubuntu pre-installed disk image.<br/>
You have several choices.
- Download an image from Ubuntu Cloud Image: https://cloud-images.ubuntu.com/releases/.<br/>
Note: Download the files that are named as xx-server-cloudimg-amd64-root.tar.gz.
Note: Download the files that are named as `xx-server-cloudimg-amd64-root.tar.gz`.
- Download the Ubuntu 14.04 image from Microsoft: https://wsldownload.azureedge.net/trusty-server-cloudimg-amd64-root.tar.gz.
- Download the Ubuntu 16.04 image from Microsoft: https://wsldownload.azureedge.net/16.4.1-server-cloudimg-amd64-root.tar.gz.
2. Download the icon file: https://go.microsoft.com/fwlink/?LinkID=747853.
3. Run `LxRunOffline /install` or use other arguments you need to be passed to `LxRun.exe`.
4. Enter the paths of the two files you downloaded when prompted. (**Note: You should use absolute paths, relative ones are not supported**)
5. Complete the installation.
- Use an image from somewhere else if you want to.
2. Download the icon file: https://wsldownload.azureedge.net/ubuntu.ico. (You can use another one too!)
3. Run `LxRunOffline /install`. Or use other arguments you need, just like you're using `LxRun.exe`.
4. Enter the paths of the two files you prepared when prompted. (**Note: You should use absolute paths, relative ones are not supported**)
5. Finish the installation.

# How it works
`LxRun.exe` uses `InternetOpenUrl()` in `wininet.dll` to download the files required. This application uses [EasyHook](https://easyhook.github.io) to inject code to its process and hooks this function and some others related. Then the download requests can be redirected to local files.
`LxRun.exe` uses `InternetOpenUrl()` in `wininet.dll` to download the files required. This application uses [EasyHook](https://easyhook.github.io) to inject code to its process , and hooks this function and some others related. Then the download requests can be redirected to local files.

0 comments on commit fc03107

Please sign in to comment.