Last active
          August 28, 2025 07:16 
        
      - 
      
- 
        Save wjrogers/1016065 to your computer and use it in GitHub Desktop. 
    Automated cygwin installation, with thanks to http://old.nabble.com/Re%3A-Customizable-cygwin-setup.exe-p25828300.html
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @ECHO OFF | |
| REM -- Automates cygwin installation | |
| SETLOCAL | |
| REM -- Change to the directory of the executing batch file | |
| CD %~dp0 | |
| REM -- Configure our paths | |
| SET SITE=http://mirrors.kernel.org/sourceware/cygwin/ | |
| SET LOCALDIR=%LOCALAPPDATA%/cygwin | |
| SET ROOTDIR=C:/cygwin | |
| REM -- These are the packages we will install (in addition to the default packages) | |
| SET PACKAGES=mintty,wget,ctags,diffutils,git,git-completion,git-svn,mercurial | |
| SET PACKAGES=%PACKAGES%,gcc-core,make,automake,autoconf,readline,libncursesw-devel,libiconv,zlib-devel,gettext | |
| SET PACKAGES=%PACKAGES%,lua,python,ruby | |
| SET PACKAGES=%PACKAGES%,vim | |
| REM -- Do it! | |
| ECHO *** INSTALLING PACKAGES | |
| setup -q -D -L -d -g -o -s %SITE% -l "%LOCALDIR%" -R "%ROOTDIR%" -C Base -P %PACKAGES% | |
| REM -- Show what we did | |
| ECHO. | |
| ECHO. | |
| ECHO cygwin installation updated | |
| ECHO - %PACKAGES% | |
| ECHO. | |
| ENDLOCAL | |
| PAUSE | |
| EXIT /B 0 | 
Nice and clean script. I'll suggest modifying the call for setup to:
setup-x86_64.exe --no-admin -q -D -L -d -g -o -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" -C Base -P %PACKAGES%
Windows 10 run mostly on 64 bit - and with --no-admin you avoid limitations on user rights
how would one add a fish shell to it? by replacing mintty with fish?
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
After installing Cygwin, run these two commands:
The first command above requires human interaction to answer questions, so it's not 100% "automatic".