Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > TrueUpdate 2.0

 
 
Thread Tools Display Modes
  #1  
Old 04-20-2005
jhum jhum is offline
Indigo Rose Customer
 
Join Date: Apr 2005
Posts: 10
Mulitple download source folders

Is there a way that a series of document files can be downloaded from multiple folders?

For example:

Is it possible to have the updated files downloaded from two different folders such as:
"www.yourdomain.com/patches/folder1/subfolder1"
and
"www.yourdomain.com/patches/folder2/subfolder2"

If so, how do I go about setting this up in the server script?

Thanks,
jhum
  #2  
Old 04-20-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi jhum,

TrueUpdate 2.0 has a built-in screen that makes accomplishing this very easy, the screen is called: "Download Multiple Files" and it comes in three varieties: HTTP, FTP, and LAN.

The way to use this screen is to add it to your Server Screens list and then configure the On Preload event the screen to "know" about all of the files that you want to download. You do this by configuring and adding more entries into the screen globals file table. It is actually much easier then it sounds.

Basically each entry in the screen globals file table is a file that will be downloaded. Each entry has the following settings, which are pretty self-explanatory:

SourceURL = "http://www.yoursite.com/yourfile1.exe",
DestinationPath = "C:\\My Downloads\\yourfile1.exe",
Port = 80,
Timeout = 30,
UseBasicAuth = false,
AuthUsername = "Username",
AuthPassword = "Password",
UseSSL = false,
TransferType = MODE_BINARY

For the most part you will probably only have to configure: SourceURL, DestinationPath, AuthUsername, and AuthPassword. Once you take a look at the screen you should be able to figure out how to configure it to suit your needs.

After that simply call the screen from either your Server script or your Client script, you will probably want to add the “Download File Failed” screen after your “Download Multiple Files” to catch and stray errors.

Hope this helps!
__________________
MSI Factory The Next Generation Intelligent Setup Builder
  #3  
Old 05-30-2005
jhum jhum is offline
Indigo Rose Customer
 
Join Date: Apr 2005
Posts: 10
Hi Mark,

I am using the 'Download Multiple Files' screen with the HTTP option. However, I don't quite get how I configure the 'On Preload' script so that it is configured to download files from two different folders on a web server. I would like to have files downloaded from two different source URLs:

"http://www.mycompany.com/patches/application1"
"http://www.mycompany.com/patches/application2"

Where and how do I add another SourceURL Folder by modifying the code below:

-- Where do you want to download all document files from?
g_SourceURLFolder = "www.mycompany.com/patches";
g_HTTPTimeout = 30;
g_HTTPPort = 80; -- if using HTTPS, the port must be 443
g_HTTPUseBasicAuth = false;
g_HTTPAuthUsername = "";
g_HTTPAuthPassword = "";
g_HTTPUseSSL = false; -- set to true if using HTTPS
g_HTTPTransferType = MODE_BINARY;

-- What temporary folder do you want to download all document files to?
g_DocFileDownloadFolder = SessionVar.Expand("%TempFolder%\\Patch");

-- Set up a table for all document files.
g_tableFiles = {};

-- Set up the list of files to install
g_tableFiles[1] = { SourceFilename = "data.xml",
DestinationPath = SessionVar.Expand("%SourceFolder%\\..\\..\\content \\data.xml"),
Overwrite = FILE_INSTALL_OLDER,
CreateBackup = false,
SharedSystem = false};

g_tableFiles[2] = { SourceFilename = "homePage.swf",
DestinationPath = SessionVar.Expand("%SourceFolder%\\..\\homePage.sw f"),
Overwrite = FILE_INSTALL_OLDER,
CreateBackup = false,
SharedSystem = false};

Please advise
  #4  
Old 05-31-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi jhum,

It's difficult for me to tell how to modify the code that you posted since that code is not the default code for the Download Multiple Files HTTP screen, and I do not know how any of it is handled outside of the On Preload script.

I'm also a bit confused about what you actually want to do, when you say download files from different folders, do you mean that you are trying to download the same files from two possible locations? Or that you are downloading different files that will exist in different folders?

Using the default Download Multiple Files HTTP screen you might try something similar to the following, I have highlighted the important parts in red:

Code:
-- These actions are performed before the screen is shown.

-- Set up a table for this screen's global variables
-- so we don't accidentally modify any global variables that are used elsewhere
screen_globals = {};

-- Should the screen abort if any single file download fails?
screen_globals.AbortOnFirstFailedDownload = true;

-- Should the screen only return SR_SUCCESS if *ALL*
-- of the files are downloaded successfully? (If false,
-- the screen will consider it an overall success 
-- if any single file in the list is downloaded)
screen_globals.RequireAllFilesForSuccess = true;

-- Set up a table for the list of files to download
screen_globals.tableFiles = {};

-- Set up the list of files to download
screen_globals.tableFiles[1] = { SourceURL = "http://www.mycompany.com/patches/application1/data.xml",
			DestinationPath = SessionVar.Expand("%TempFolder%\\Patches\\application1\\data.xml"),
			Port = 80,
			Timeout = 30,
			UseBasicAuth = false,
			AuthUsername = "Username",
			AuthPassword = "Password",
			UseSSL = false,
			TransferType = MODE_BINARY };

screen_globals.tableFiles[2] = { SourceURL = "http://www.mycompany.com/patches/application1/homePage.swf",
			DestinationPath = SessionVar.Expand("%TempFolder%\\Patches\\application1\\homePage.swf"),
			Port = 80,
			Timeout = 30,
			UseBasicAuth = false,
			AuthUsername = "Username",
			AuthPassword = "Password",
			UseSSL = false,
			TransferType = MODE_BINARY };
				
screen_globals.tableFiles[3] = { SourceURL = "http://www.mycompany.com/patches/application2/data.xml",
			DestinationPath = SessionVar.Expand("%TempFolder%\\Patches\\application2\\data.xml"),
			Port = 80,
			Timeout = 30,
			UseBasicAuth = false,
			AuthUsername = "Username",
			AuthPassword = "Password",
			UseSSL = false,
			TransferType = MODE_BINARY };

screen_globals.tableFiles[4] = { SourceURL = "http://www.mycompany.com/patches/application2/homePage.swf",
			DestinationPath = SessionVar.Expand("%TempFolder%\\Patches\\application2\\homePage.swf"),
			Port = 80,
			Timeout = 30,
			UseBasicAuth = false,
			AuthUsername = "Username",
			AuthPassword = "Password",
			UseSSL = false,
			TransferType = MODE_BINARY };
__________________
MSI Factory The Next Generation Intelligent Setup Builder
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Download the source files for the 5 sample files at autoplaystudio.com Corey AutoPlay Media Studio 4.0 15 01-14-2003 11:05 PM
HOWTO: Download and Install Files from the Web Support Setup Factory 6.0 Knowledge Base 0 10-23-2002 02:16 PM
INFO: Finding Shell Folders in the Registry Support Setup Factory 6.0 Knowledge Base 0 10-10-2002 04:52 PM


All times are GMT -6. The time now is 06:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software