Forcing setup.exe not to create WSL symlinks

Jon Turney jon.turney@dronecode.org.uk
Sun Sep 6 14:44:02 GMT 2020


On 27/08/2020 13:48, Michael Wild via Cygwin wrote:
> Hmm, OK, changing script.cc to not strip out CYGWIN is trivial. But the
> harder part is that main.cc uses ShellExecuteEx() with
> SHELLEXECUTEINFO.verb set to "runas" in order to re-run setup elevated.
> This resets all environment variables back to default. In my instance I can
> circumvent this by passing --no-admin and running from an elevated shell
> where CYGWIN is set already. And indeed, this works and resolves my Docker
> problem. I attached this fix as a patch. But on the other hand, I find this
> behavior to be a bit confusing. However, I don't see an easy way of
> resolving the "runas" issue, because it is by design. An option would be
> that the calling process passes the CYGWIN variable as a command line
> argument to the elevated process. But that is also ugly. What do you guys
> think?

I think an option which explicitly specifies the symlink style would be 
best (rather than option to specify the CYGWIN env var).

You'd also need to teach setup to create syminks in these different 
ways, and set the CYGWIN env var for scripts appropriately.


More information about the Cygwin mailing list