1. On the machine with access to Internet, execute setup.exe as Administrator.
2. Click Next
3. Select Download Without Installing and click Next
7. The program will a downloading:
8. Next, you'll see the Cygwin packages. Now you can select which packages will be downloaded. You could download them all, but trust me, it's very unlikely that you need more than the basic packages here. Anyway, type "open" in the Search textbox. Expand Net and click on "Skip" for opwnssh and openssl (this is for having ssh access to your machine, configurations will be explained in the next article). You should see something like this:
Now press Next.
8. You'll see a warning about dependencies. Just click Next.
Now you have to wait a little bit for the files to be downloaded:
9. When the downloads are completed, you should see this:
Just press Finish.
10. Copy the folder where you downloaded the Cygwin files to the Virtual Machine without access to internet. In my case, that folder is D:\Cygwin downloaded files. Also, copy the setup.exe file.
11. Run setup.exe AS ADMINISTRATOR. If you run this without the appropriate privileges, you'll install Cygwin, but you'll get weird errors when using it. One it is open, press Next.
12. Select Install from Local Directory and press Next.
13. In Root Directory, select where will Cygwin will be installed. This folder will be like root from the Cygwin point of view. Check All Users (RECOMMENDED) and press Next.
14. Select the folder with the downloaded Cygwin files and press Next.
15. Typen "open" in the search textbox and enable openssh and openssl again. Press Next twice.
16. You'll see that Cygwin is being installed. When it finishes, just press Finish:
That's it! Now you can double click the Cygwin icon in the desktop and try some commands. I hope this is useful for you! Have fun!