I design VB applications for approximately 300 employees in a networked environment. It's difficult to keep
those PCs up to date with the most current version of an app, so I use VB's auto-incrementing
version-numbering feature to have the app test if a newer version is available when it launches.
Set the app to auto-increment when it's compiled. Store the setup/upgrade files on a networked drive (be
sure to use the UNC path rather than drive letters), and include an uncompressed INI file that lists the
newest version available. Then embed this code into the Form_Load event:
Open IniFile$ For Input As #1
Line Input #1, sUpgradeVersion$
If sUpgradeVersion > (Format(App.Major, "00") & "." & _
Format(App.Minor, "00") & "." & _
Format(App.Revision, "0000")) Then
' shell out to networked upgrade
If the version in the networked INI file is greater than that stored within the running app, the app launches
the upgrade program off the network and exits, so all files can be upgraded. This works especially well
when you're in the early stages of a rollout and need to distribute multiple small incremental patches over a
number of days.