Adding a TU2 LAN update server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Tek
    Forum Member
    • Mar 2004
    • 695

    Adding a TU2 LAN update server

    Hi.

    I have set up my TU2 projects to download the update information using HTTP and the update is also downloaded from the same HTTP server, but what I wanted to do was to add a LAN update server so that anyone within the building can do an update and the update information as well as the update itself is downloaded from a LAN server.

    I have added the LAN update server and after I published my files they do show up on the LAN, but I think what I'm missing is if the LAN update location is detected that I need to add a new screen to download from the LAN if it is found.

    Can anyone tell me what is needed to do this?

    Thanks.
  • Mark
    Indigo Rose Staff Member
    • Jun 2000
    • 1945

    #2
    Hi Tek,

    TrueUpdate 2.0 is a very flexible product and there are many different ways to go about this so I will point out a few features that will hopefully give you some ideas.

    If you want you can simply try to load the server file from the LAN server first using the TrueUpdate.GetServerFile(string ServerFile) action, and then if that fails you can load from the web based server.

    Code:
    bGotServer = TrueUpdate.GetServerFile("LAN Based Server", true, nil);
    if (not bGotServer) then
    	bGotServer = TrueUpdate.GetServerFile("WEB Based Server", true, nil);
    end
    If you used the project wizard to create your project your can simply move the LAN based server to the top of your list to ensure that it is checked first.

    If you really wanted to show a special screen, what you could do is create a LAN screen (that gets the server file from the LAN server) and an HTTP screen (that gets the server file from the web). Then perform a File.DoesExist() action (or a File.Search()) on your LAN based server file, if the file exists then show the LAN screen, if it does not then show the Web screen.

    My suggestion would be to use one of the first two methods so that the LAN location is always checked, then if that fails the Web location is checked.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment

    • Tek
      Forum Member
      • Mar 2004
      • 695

      #3
      Hi Mark,

      Thanks for the help.

      When I created the TU2 project I used the wizard and selected the HTTP server method and the single zip file update. I have made some small changes to it but nothing major since I don't know TU2 very well yet.

      All I wanted to do was to add the ability to try a LAN server first and if it failed, use the HTTP server for the server configuration files and for the zip file.

      I have attached my current project if you can give me some pointers on where to add this. Sorry I am still learning.
      Attached Files

      Comment

      • Mark
        Indigo Rose Staff Member
        • Jun 2000
        • 1945

        #4
        Hi Tek,

        Just to let you know, the project that you attached had only one TrueUpdate Servers, your HTTP server.

        If you want to add a LAN-based server that is always checked first, simply add the LAN-based server to your project (Project | TrueUpdate Servers) and then move it to the top of the server list. This will ensure that it is checked before the HTTP server.

        The Download Server Script screen checks the TrueUpdate Server list from top to bottom, so putting a server at the top of the list ensures that it is checked first.
        MSI Factory The Next Generation Intelligent Setup Builder

        Comment

        • Tek
          Forum Member
          • Mar 2004
          • 695

          #5
          Hi Mark,

          Yes I have figured that part out already. This project file only contains the HTTP server file location. I already know how to add the LAN server file location, but what I don't know how to change is to tell the script to check the LAN first then check the HTTP afterwards (or I should say, where to place it)

          Comment

          • Mark
            Indigo Rose Staff Member
            • Jun 2000
            • 1945

            #6
            Hi Tek,

            You don't need to do anything to the script, simply putting the LAN-based TrueUpdate server first in the server list will cause your project to check the LAN server first, and then if that fails use the HTTP server.

            The Download Server Script screen checks the TrueUpdate Server list from top to bottom, continuing until a server script is successfully downloaded or until it has tried all items in the list.
            MSI Factory The Next Generation Intelligent Setup Builder

            Comment

            • Tek
              Forum Member
              • Mar 2004
              • 695

              #7
              Mark,

              I thought it would be as easy as adding the 'Download File (LAN)' screen above the 'Download File (HTTP)' screen, but when it tries to do an update it still has some variables in it to download from the HTTP server. I get two different errors when I run it.

              'Download File (LAN) > On Start, Line 56: Argument 1 must be of type string.

              Then when I hit OK I get:

              On Finish, Line 10: attempt to concatenate field `?' (a nil value)

              So I don't know where to go from here.

              Comment

              • Tek
                Forum Member
                • Mar 2004
                • 695

                #8
                I think I have figured it out. (Thank God for debug)

                I added the following code to the 'On Preload' screen for 'Download File (LAN)':

                Code:
                -- Where do you want to download the zip file from?
                g_ZipFileSource = SessionVar.Expand("\\\\192.168.7.44\\OMT\\QA\\updates\\v2\\mltupdate.zip");
                
                -- Where do you want to download the zip file to?
                g_ZipDownloadDest = SessionVar.Expand("%AppFolder%\\updates\\mltupdate.zip");
                This seems to make it work fine. I'll continue testing and see if it works out ok.

                Thanks for all your help. :yes
                Last edited by Tek; 04-11-2005, 12:48 PM.

                Comment

                Working...
                X