Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Installation of Cygwin #256

Open
larytet opened this issue Dec 18, 2017 · 2 comments
Open

Installation of Cygwin #256

larytet opened this issue Dec 18, 2017 · 2 comments

Comments

@larytet
Copy link

larytet commented Dec 18, 2017

My goal is to script Cygwin installation in Windows 10. I added

# get cygwin
$cygwin_download_url = "https://www.cygwin.com/setup-x86_64.exe"
Write-Output "Downloading $cygwin_download_url"
(New-Object System.Net.WebClient).DownloadFile($cygwin_download_url, "C:\Users\User\Downloads\setup-x86.exe")

to the OPENSSH.PS1 script
and a section in the Autounattend.xml

                <SynchronousCommand wcm:action="add">
                    <CommandLine>cmd.exe /c C:\Windows\Temp\setup-x86.exe -q -R C:\cygwin -l C:\Windows\Temp --packages "wget,zip,screen" -s http://cygwin.mirror.constant.com</CommandLine>
                    <Description>Install Cygwin</Description>
                    <Order>99</Order>
                    <RequiresUserInput>true</RequiresUserInput>
                </SynchronousCommand>

The Cygwin setup fails when "Changing gid to Administrators". The same or similar problem I experience when running a powershell script with

Start-Process "C:\Windows\Temp\setup-x86.exe" -ArgumentList "-q -R C:\cygwin -l C:\Windows\Temp --packages `"wget,zip,screen`" -s http://cygwin.mirror.constant.com" -NoNewWindow -Wait

I suspect that if I switch the uid to a regular user the setup will work - it works from the command line in the installed system after I login. I am new with PowerShell and can not figure how to do this. I will appreciate any tips.

Thanks

@StefanScherer
Copy link
Collaborator

You might want to look at https://github.com/boxcutter/windows/blob/master/eval-win10x64-enterprise-cygwin.json - there are templates with cygwin which could be useful.

@larytet
Copy link
Author

larytet commented Dec 19, 2017

Thanks - this was a great tip. Specifically https://github.com/boxcutter/windows/blob/master/floppy/cygwin.bat
I ma definitely not alone. The following was encouraging

:: Force CYGWIN_ARCH to 32-bit - 64-bit seems to crash a lot

This line works, or at least works most of the time

C:\Users\user\Downloads\setup-x86.exe -q -R C:\cygwin -s http://mirrors.kernel.org/sourceware/cygwin -P "wget,screen,cat" -a x86 -v -B -d -n -N

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants