semi-automated installation and/or updates

Tom Schutter
Sun Aug 19 09:06:00 GMT 2012

On Sat 2012-08-18 22:37, Andrey Repin wrote:
> Greetings, Tom Schutter!
> > I have seen various scripts that do semi-automated installation and/or
> > updates of Cygwin, but none seemed to have all of the features that I
> > wanted.  So I wrote yet another batch file which can be found at:
> >
> There's a couple of errors in it. Also you can move configuration to an
> external file and
> CALL "%~dp0\conffile.bat"
> it.

I moved the configuration to cygwin_setup_config.bat.

> Though, I suggest .cmd extension for batch files.

Meh.  .bat is what I have always used.

> I'm actually surprized, that
> >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
> works, normally, you'd want to place redirects after the command.

I was surprised as well when I saw that it worked. Normally I do put the
redirects after the command.  This was a copy-n-paste job.  I moved them
to the end to be consistent.

> if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
> should be EQL, not EQU. Keep in mind that this comparison WILL fail, if
> extended mode is disabled.
> Fail-proof syntax:

Actually, EQU is correct.  From "if /?":
  where compare-op may be one of:
    EQU - equal

I changed to the "if [not] errorlevel <number>" syntax to reduce the
dependancies on extended mode.  Note that there are probably other
places that depend upon extended mode.

> References to _TEMPFILE MUST be quoted. You're referring to a filename,
> which may contain spaces.

You are correct.  I normally quote filenames when expanding them, I just
missed that one.  Fixed.

> You SHOULD NOT run rebaseall manually, unless you really need to do so.

I added the call to rebaseall because of this post by Corinna:

Installing more packages that are forgotten in the first run of
setup.exe is what I (and I suspect others) do all the time.  I would
love to get some feedback either way on this issue.

> Sorry for my terrible english...

There are some native speakers who I wish were as literate as you.

Tom Schutter

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list