How to reinstall everything?

Brian Inglis
Mon Jan 18 22:48:03 GMT 2021

On 2021-01-17 13:53, matthew patton via Cygwin wrote:
> On Sunday, January 17, 2021, 02:44:37 PM EST, Achim Gratz wrote:
>>matthew patton via Cygwin writes:
>>> can we fix setup.exe to read STDIN with '-P', like so?
>>> echo 'pkg1,pkg2,pkg3' | setup.exe -P -
>> You probably forgot that setup is a Windows program.  besides, you must
>> not start it from the Cygwin that you are about to install a package into.

For years I've run Cygwin Setup from a script that:

* checks if a new version gets downloaded and verifies it;
* downloads and verifies setup.ini, checking if my nearby mirror is up and up to 
* starts Task Scheduler to allow me to run elevated shut down tasks for old cron 
processes, Cygwin services, remaining detached processes;
* starts Task Manager/Details/order by Image Path to check all processes are 
gone and allow me to deal with any left;
* starts Cygwin Setup with my setup.rc parameters and any new packages to install;
* kills off interactive mintty, console and pty X, bash, and its own process.

> so Windows programs can't be written to read from STDIN? I can't think of any Unix utility that uses commas to delimit. And any Windows one that uses commas is clearly improper/wrong as well.
> If "you're not supposed to invoke setup.exe from within cygwin" were true then all the 'xargs' and 'paste' workarounds are null and void. And no, I don't automatically reach for xargs to bandaid around poorly written programs that violate 50 years of convention.

It's a Windows program with 20 years of its own history built with no 
proprietary tools! You can change it.
Remember it was only recently that Windows gained support for quoted command 
line and long args, so work arounds to allow running with argument lists from and .bat scripts were required, and have been retained for 
compatibility with downstream usages.

Window utilities with similar requirements have each added their own unique 
option handling quirks to deal with them e.g.

	> sc <system> <command> <param>= <value>...

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

More information about the Cygwin mailing list