PDA

View Full Version : Server location URL


mcme
10-19-2005, 03:33 PM
Hi Members,
I need help to find about the list of server locations true updates using. At this point i am able to get the true update server name/ID from the table returns by action GetUpdateServerList(). But it gives only Servername not actual LocationURL.
Any help will be appreciated.

Mark
10-21-2005, 08:24 AM
Hi mcme,

Why do you need to know the URL associated with the each server? You do not need to know the URL of the server in order to download it, you can simply use TrueUpdate.GetServerFile() and pass it a server id.

Currently there is no way to get more information about a specific server in TrueUpdate, however you could do this manually by creating your own table with this information, indexed by the server ID, in the Client Script.

I have also added this as a suggestion.

rkligman
10-22-2005, 02:10 PM
If you are trying to make a Generic download script then knowing the Server URL is extremely important! Right now I grab the Server name and then hard code the location. What happens when the Server location changes though? I have to go back into my script and change all my download locations.

From Client Script:
-- Loop through the list of TrueUpdate Servers
for index, ServerName in tableTrueUpdateServers do

-- Attempt to download the server configuration files
GotServerFiles = TrueUpdate.GetServerFile(ServerName, false);

-- If the download was successful, run the server script
if(GotServerFiles) then
-- Capture the location of the TrueUpdate Server where we found the files
g_SourceServer = tableTrueUpdateServers[index];

TrueUpdate.RunScript("Server Script");
break;
end
end

From Server Script:
if (g_SourceServer == "Ethnic Print Media Server") then
g_SourceURL = "http://www.epmg.com/Downloads/Setup.exe";

This would be much nicer if I knew the URL because then I would have it be generic.


Hi mcme,

Why do you need to know the URL associated with the each server? You do not need to know the URL of the server in order to download it, you can simply use TrueUpdate.GetServerFile() and pass it a server id.

Currently there is no way to get more information about a specific server in TrueUpdate, however you could do this manually by creating your own table with this information, indexed by the server ID, in the Client Script.

I have also added this as a suggestion.