Results 1 to 5 of 5

Thread: Can I automatically install updates?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    67

    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:
    1. Dim ff As Long
    2. Dim row As String
    3.  
    4. THIS_VERSION = "1.5"                                        'DEFINES THIS VERSION
    5.  
    6. ff = FreeFile
    7. Open "G:\Borkat Team\AUTOMATION TOOLS\OE AUTOMATION\programming\version log\oe_version.txt" For Input As #ff    
    8. 'the text file just says 1.5 or 1.6 or whatever my most current version will be at the time.
    9. Line Input #ff, row
    10.             NEWEST_VERSION = Left$(row,3)           'DEFINES THE NEWEST VERSION  
    11.     If THIS_VERSION <> NEWEST_VERSION then
    12. Begin Dialog outdated 145, 86, 241, 60, "OE AUTOMATION v 1.5"
    13.    OkButton  96, 43, 50, 14
    14.    Text  4, 23, 227, 12, "Please install the newest version at this time."
    15.    Text  3, 7, 227, 10, "ERROR:  You are not using the most current version of this Utility!"
    16. End Dialog
    17.     Dim OUTDATED as outdated
    18.     Dialog OUTDATED
    19.     Goto END_OF_MACRO:                                        'I know, goto statements are ghetto...but in this situation, it works perfectly.
    20.     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?

  2. #2
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    372

    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?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    67

    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:
    1. 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")

  4. #4
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    372

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

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    67

    Re: Can I automatically install updates?

    Sweet, it works perfectly like this:
    VB Code:
    1. SourceFile = "C:\test\test.txt"
    2. DestinationFile = "C:\test\I ROCK.txt"
    3. 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
  •  



Click Here to Expand Forum to Full Width