I think this will be an easy one for you guys...I hope...
I'm just about to distribute an app to a whole bunch of users that automates orders through an Attachmate Extra! session. My concern is that there will undoubtedly be several enhancements in the future that I need to be 100% certain EVERY employee installs at the time they're built and doesn't use outdated versions. To ensure this'll happen, I included a code that will stop the app if its not the most current version according to my log:
VB Code:
Dim ff As Long Dim row As String THIS_VERSION = "1.5" 'DEFINES THIS VERSION ff = FreeFile Open "G:\Borkat Team\AUTOMATION TOOLS\OE AUTOMATION\programming\version log\oe_version.txt" For Input As #ff 'the text file just says 1.5 or 1.6 or whatever my most current version will be at the time. Line Input #ff, row NEWEST_VERSION = Left$(row,3) 'DEFINES THE NEWEST VERSION If THIS_VERSION <> NEWEST_VERSION then Begin Dialog outdated 145, 86, 241, 60, "OE AUTOMATION v 1.5" OkButton 96, 43, 50, 14 Text 4, 23, 227, 12, "Please install the newest version at this time." Text 3, 7, 227, 10, "ERROR: You are not using the most current version of this Utility!" End Dialog Dim OUTDATED as outdated Dialog OUTDATED Goto END_OF_MACRO: 'I know, goto statements are ghetto...but in this situation, it works perfectly. End If
In this example, 1.5 is the version of the tool that they're using. If I've written a 1.6, then I'll update that version text file to say 1.6 instead...and that will stop users from running an outdated version of the tool. But then they have to install the scripts for the new version. I just need a code that will take "G:\OE AUTOMATION v 1-6.ebm" and save it as C:\Program Files\Attachmate\Extra\E!E2K\Macros\OE AUTOMATION V 1-6.ebm". Does that exist?




Reply With Quote