Andrew DeFaria wrote: > On 04/02/2010 10:19 PM, Jeremy Bopp wrote: >> It gets even better once you look through the other command line options >> listed with --help because you can automate installation selections to >> the point that the users don't have to do anything more than run your >> batch file. They won't have to interact with any of setup.exe directly. >> The only thing they will see is the window showing the package >> installation progress which they can cancel if they choose. >> > A "silent" install might be cool but I can also see that it would be > useful to allow to user to browse though some of the optional packages. > For example, while maybe not everybody would want gcc and make, some > may. Or perhaps they want Perl or Apache. However I want to make sure > that ssh is installed (it'd be nice if I could automate the running > ssh-host-config, for example) so that I can ssh into their machine to > fix things.
I think that if you leave off the silent install option that your other selections set by command line options are respected in the UI, so the extra packages you select will show as selected by default once the user arrives at the package selection page. Unfortunately, you have to trust your users to correctly hit the Next button on every page without changing anything until they get to the package selection page. Whether or not that trust is warranted is between you and your users. ;-) The batch file I wrote for work actually includes a bash shell at the end of it for post-install actions. After the actual batch logic, you can run the goto :eof command to jump the batch to the end of the file past the bash scripting. It looks something like this: @echo off rem This batch file installs Cygwin with extra packages. rem It then runs some post-install logic written for bash rem which is simply appended to the end of this script. setup.exe -P pkg1,pkg2,... <more_options> C:\cygwin\bin\sed "0,/^BASH SCRIPT BEGINS/ d" <%0 | C:\cygwin\bin\bash goto :eof BASH SCRIPT BEGINS echo 'Starting post-install actions...' ... ... # This is the end of both the bash script and the batch file! I may be foggy on some details, but hopefully, you get the idea. :-) The only requirement is that the user drop setup.exe into some directory next to this batch file. You could even get clever and have the batch file tell them where to get setup.exe in case they run the batch file without first downloading setup.exe. I should probably do that for *my* script... -Jeremy -- 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