Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Aug 7, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Spread Upgrades Over the Network

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$
Close #1

If sUpgradeVersion > (Format(App.Major, "00") & "." & _
        Format(App.Minor, "00") & "." & _
        Format(App.Revision, "0000")) Then
                ' shell out to networked upgrade 
                ' installation
End If
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.
Rodney Samodral
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date