Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2005
    Posts
    3

    Huh? How to set the TrueUpdate servers at loading time

    Hello,

    I was trying to find out how can I set the TrueUpdate servers in TU2 client at the loading time.
    I've looked on the TU2 help, but wasn't able to find it.
    I'd like to set the location of my TrueUpdate servers by reading from the registry.

    for example,
    --GotServerFiles = TrueUpdate.GetServerFile(ServerName, false);
    GotServerFiles = TrueUpdate.GetServerFileEx("mydomain.com/trueupdate/myproduct/", false);



    I would appreciate your help.

    Thanks.

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    You can download the server file using HTTP.Download and then TrueUpdate.LoadServerFile to load and execute it. The downside to this is that it will miss out on the automatic exe/dat file updating. Although you could roll that youself too.

    EDIT:

    Another idea would be to use a Session Variable in the TrueUpdate Server properties dialog. So, instead of using:

    www.yourserver.com/whatever/myproduct

    as the Folder URL field, you could use:

    %RegServerURL%

    Then use SessionVar.Set to set %RegServerURL% to a value that you read using Registry.GetValue.
    Last edited by Brett; 06-01-2005 at 11:55 AM.

  3. #3
    Join Date
    Jun 2005
    Posts
    3
    Thanks a lot...

  4. #4
    Join Date
    Aug 2005
    Posts
    15
    Quote Originally Posted by Brett
    You can download the server file [...] The downside to this is that it will miss out on the automatic exe/dat file updating.
    Hi, I am trying to implement something that seems very similar to this question. I want to read the location of the server script files from an XML file, and then run that script. Can someone please explain what is meant by missing out on the automatic exe/dat file updating please?

    Quote Originally Posted by Brett
    you could use:
    %RegServerURL%
    Then use SessionVar.Set to set %RegServerURL% to a value that you read using Registry.GetValue.
    Can someone explain this solution in a bit more detail too please? After you have set the session variable, what do you need to do to load the server script?

    Thanks!

  5. #5
    Join Date
    Aug 2005
    Posts
    15
    Another questions I have is: can you add servers to True Update during run time?
    Is there a way to add an update server to True Update, so that it would be retrieved by the "GetUpdateServerList" action?
    Thanks!

  6. #6
    Join Date
    Jul 2003
    Posts
    712
    Quote Originally Posted by NickT
    Can someone explain this solution in a bit more detail too please? After you have set the session variable, what do you need to do to load the server script?
    The first thing you need to do is to set the URL of an update server to a session variable (see attachment). Choose Project > TrueUpdate Servers to get to that dialog.

    Once you've set that session variable, on your Client Script tab, use one action to pull a value from the registry, and a second to assign that value's contents to the session variable:
    Code:
    sServerURL = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Application", "UpdateServerURL", true);
    SessionVar.Set("%RegServerURL%", sServerURL);

  7. #7
    Join Date
    Jul 2003
    Posts
    712
    Quote Originally Posted by NickT
    Can someone please explain what is meant by missing out on the automatic exe/dat file updating please?
    Basically, by default, TrueUpdate will try to get three files (ts1, ts2, and ts3), and if necessiary (if you change somethign in the client), will update the client on the user's system.

    If you use the TrueUpdate.LoadServerFile action, you are only loading the server file (and won't be updating the client, etc).

    Quote Originally Posted by NickT
    Another questions I have is: can you add servers to True Update during run time?
    The short answer is no. THere is no action to add servers at runtime. You can modify the list of servers in the design environment and, on the next update, your users client will update with teh latest servers . . . but no, not at runtime through script.

    Does that make sense?



    Can someone explain this solution in a bit more detail too please? After you have set the session variable, what do you need to do to load the server script?

    Thanks![/QUOTE]

  8. #8
    Join Date
    Aug 2005
    Posts
    15
    Quote Originally Posted by Desmond
    Basically, by default, TrueUpdate will try to get three files (ts1, ts2, and ts3), and if necessary (if you change something in the client), will update the client on the user's system.

    If you use the TrueUpdate.LoadServerFile action, you are only loading the server file (and won't be updating the client, etc).
    [...]
    Does that make sense?
    Desmond, thanks for the reply - this does make sense. I found that I not only need to "load" the script, but also "run" it
    I am taking the route of downloading the files, and then running them (as opposed to the session variable solution.)

    As far as telling when the updater exe and dat files need to be updated, is that something that can be discovered by comparing their file sizes?

    Also, I am thinking it may not be necessary because I can just release a patch (with Visual Patch) that could update both of those files if need be, right?

  9. #9
    Join Date
    Jul 2003
    Posts
    712
    Quote Originally Posted by NickT
    As far as telling when the updater exe and dat files need to be updated, is that something that can be discovered by comparing their file sizes?
    I suppose that'd work . . . you'd have better luck checking the file's CRC value to see if it had changed, or combine both techniques to be oober safe!

    Quote Originally Posted by NickT
    Also, I am thinking it may not be necessary because I can just release a patch (with Visual Patch) that could update both of those files if need be, right?
    Yes, that is definitely a way around it.

    Good luck with the project!

Similar Threads

  1. TrueUpdate 2.0 FAQ
    By Colin in forum TrueUpdate 2.0
    Replies: 0
    Last Post: 01-04-2005, 12:25 PM
  2. What's New in TrueUpdate 2.0?
    By Colin in forum TrueUpdate 2.0
    Replies: 0
    Last Post: 01-04-2005, 12:24 PM
  3. Key Features of TrueUpdate 2.0
    By Colin in forum TrueUpdate 2.0
    Replies: 0
    Last Post: 01-04-2005, 12:23 PM
  4. TrueUpdate 1.0 Press Release
    By Ted in forum TrueUpdate 1.0
    Replies: 0
    Last Post: 08-17-2001, 02:34 PM
  5. Press Release: TrueUpdate 1.0
    By Ted in forum Announcements & News
    Replies: 0
    Last Post: 08-13-2001, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts