Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <51789.213.38.17.50.1042046662.squirrel@raq299.uk2net.com> Date: Wed, 8 Jan 2003 17:24:22 -0000 (GMT) Subject: Re: Setup.exe From: "Dave Hooper" To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal >>> Isn't that kinda up to the user. When you finish downloading new >>> packages you kill your internet connection as cygwin setup won't >>> need it. > > Autodialling isn't something that (most) programs do. Windows does it for > them. So setup doesn't know if a connection was made on it's account or > not. I'd agree that it isn't something most programs do. I'd disagree if you were to say "Autodialling isn't something that most programs need to do", however. Windows cannot know that setup.exe has 'finished' with the internet connection (I believe Windows will by default wait until setup.exe has exitted before closing the dialup connection) unless setup.exe gives Windows a hint. I'm almost utterly convinced that a sequence in setup.exe a bit like the following will do the trick admirably. DWORD dwNetAccess; InternetGetConnectedState(&dwNetAccess,0); if (dwNetAccess & INTERNET_CONNECTION_MODEM) { // autodial now. windows will update a reference count // if the connection is already open InternetAutoDial(INTERNET_AUTODIAL_FORCE_ONLINE, &hwndSetupDialog); } [snip - setup.exe goes and downloads the packages] if (dwNetAccess & INTERNET_CONNECTION_MODEM) { // hang up. windows will decrease a reference count. // Can't remember if Windows prompts the user if they // wish to close the dialup connection when the reference // count reaches zero, or if Windows just does it anyway! InternetAutodialHangup(0); } I'm speculating, I'll try it when I get a chance. Of course this relies on behaviour built into Internet Explorer 4 and newer (more accurately built into the version of WinInet.dll shipping with IE 4, or a newer version of that dll) but setup.exe can easily test for the presence of this and do what it currently does if it can't find the functions or can't find wininet.dll in the path. > Isn't the change from downloading to installing info enough? Some people won't notice that. A larger issue is if you go away and make some tea. I for one don't stare at setup.exe while it downloads eighty-six megabytes of information on a 33.6K modem. (I do sit and watch defrag for hours on end though, but that's just me) > http://sources.redhat.com/cygwin-apps/setup.html Thanks. Will play. d -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/