cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
InstMarco
Level 2

Downloading additional install files

Hi All,

I have tried to find the answer on how to download additional installation files from an HTTP location.

We have an installationproject that installs our softwares when our customers runs the installation package.
But now we have extend our software with a new software that has to be included, but the installation
package is now at double disk size.

What I like to do is this:

1) The user runs our installation package and select TARGETDIR etc
2) When the user have gone thru the installation and now are ready to install files I would like to download
additional setup files, showing a progressbar to the user and when the download is complete, the installation
starts and there at some point InstallShield will extract the new downloaded additional setup files to
the TargetDir as well.

There are a feature called HTTP location, but no example on how to use HTTP Location, only FeatureGetData
and there I only get the HTTP URL to the new files.

Any tips or ideas on how to solve this is appreciated!


Kind Regards,
Marco Eberhardt.
Labels (1)
0 Kudos
(2) Replies
rrinblue22
Level 9

Did you look at "CopyFile" function and then the help topic "Embedding Custom Transfer File Operations"
0 Kudos
InstMarco
Level 2

Hi All,

I have now solved it on how to download an zip file from HTTP location
with the help of CopyFile function and unzip it to targetdir, this is what I did:

Declare a prototype:
prototype NUMBER CopyOwnFiles();

Now the function itself:
function CopyOwnFiles()
begin
szSrcFile = "http://www.yourDomain.com/yourfile.zip";
//Make sure you have set targetdir before running this!
szTargetFile = TARGETDIR ^ "yourfile.zip";

if Is(VALID_PATH, szSrcFile) then
DeleteFile (szTargetFile);
nResult = CopyFile(szSrcFile, szTargetFile);
SdShowMsg("Unpacking files.., TRUE);
myDLlFile.ExtractZipFile(szTargetFile, TARGETDIR); <-- this is my own dll to just unzip the content.
SdShowMsg("Unpacking files, FALSE);
end;

And then I call CopyAdditionalFiles from this:
//---------------------------------------------------------------------------
// OnMoving
//
// The OnMoving event is called as a result of the setup calling
// FeatureTransferData or FeatureMoveData. The event is called before any
// file transfer operations occur.
//---------------------------------------------------------------------------
function OnMoving()
begin
CopyOwnFiles();
end;

Your done! 🙂
0 Kudos