Setup.exe

Dave Hooper dave@rebuzz.org
Mon Jan 13 03:04:00 GMT 2003


>>> 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/



More information about the Cygwin mailing list