This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: semi-automated installation and/or updates


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:

>   https://github.com/tschutter/AppData/blob/master/bin/cygwin_setup.bat

There's a couple of errors in it. Also you can move configuration to an
external file and
CALL "%~dp0\conffile.bat"
it.

Though, I suggest .cmd extension for batch files.

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.

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:
IF NOT ERRORLEVEL <number>

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

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


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 18.08.2012, <22:00>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]