|
-
Jun 7th, 2006, 05:03 PM
#1
Thread Starter
Lively Member
Can I automatically install updates?
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?
-
Jun 7th, 2006, 06:01 PM
#2
Hyperactive Member
Re: Can I automatically install updates?
you only need to copy the file?
filecopy (src,dest) should do that.
or am i miss understanding you?
-
Jun 7th, 2006, 06:23 PM
#3
Thread Starter
Lively Member
Re: Can I automatically install updates?
Yeah, thats basically it. I save the most current .ebm file to the network drive, and the app needs to copy it over to the users hard drive. What am I doin' wrong with the code? It tells me there's a syntax error....
VB Code:
FILECOPY("G:\Borkat Team\AUTOMATION TOOLS\OE AUTOMATION\OE AUTOMATION v" + NEW_NAME +".ebm", "C:\Program Files\Attachmate\E!E2K\Macros\OE AUTOMATION v" + NEW_NAME + ".ebm")
-
Jun 7th, 2006, 06:34 PM
#4
Hyperactive Member
Re: Can I automatically install updates?
you probably want to make 2 strings ahead of time with the full path and filename.ext
then use the 2 strings like filecopy (str1 , str2)
if you can figure out a way to work it on the command line, you can always use shell...
-
Jun 12th, 2006, 06:48 PM
#5
Thread Starter
Lively Member
Re: Can I automatically install updates?
Sweet, it works perfectly like this:
VB Code:
SourceFile = "C:\test\test.txt"
DestinationFile = "C:\test\I ROCK.txt"
FileCopy SourceFile, DestinationFile
Thanks for your help!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|