This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Installer that downloads the features from the internet
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Nov 18, 2007
08:40 PM
Installer that downloads the features from the internet
I want to make an install that has several different components, and most of them not actually be included in the setup.exe that they download. Meaning, I only want the files downloaded to their computer only after the have checked the features they want, and clicked next. Only the required files will be included, all the optional one's I would like to keep on either an ftp, or a website. That way they only download what they want. If I included everything, it would be a very big install file to download... :confused: Any Ideas..???
(4) Replies
‎Nov 19, 2007
01:12 PM
Hi Lenny,
I've done this for a couple of my installers. This may not be the most graceful way of doing it (I'm still fairly new to IS), but it seems to work. This is also assuming you're creating an InstallScript MSI installer.
First, create a new feature and set either the ftp or http location attribute to point to the file you want to download. The only catch I've found so far is that you can't embed a username/password set in the URL. Then create a function for the feature's installing action that downloads the file, starts the installer, and deletes the temp files.
Here's the script I use to download and install a feature in one of my projects:
If you're not trying to run another installer, once you download the files, you can script whatever you need to do.
Hope this helps.
Leigh
I've done this for a couple of my installers. This may not be the most graceful way of doing it (I'm still fairly new to IS), but it seems to work. This is also assuming you're creating an InstallScript MSI installer.
First, create a new feature and set either the ftp or http location attribute to point to the file you want to download. The only catch I've found so far is that you can't embed a username/password set in the URL. Then create a function for the feature's installing action that downloads the file, starts the installer, and deletes the temp files.
Here's the script I use to download and install a feature in one of my projects:
function Tor_Installing()
string svTorPath, svTorDLDir, svTorInstallFile;
number nvResult;
begin
FeatureGetData(MEDIA, "Tor", FEATURE_FIELD_HTTPLOCATION, nvResult, svTorPath);
svTorDLDir = INSTALLDIR ^ "Tor";
// download the file and then store the filename
CreateDir(svTorDLDir);
XCopyFile(svTorPath, svTorDLDir, COMP_NORMAL);
nvResult = FindFile(svTorDLDir, "*.exe", svTorInstallFile);
// install
if (LaunchAppAndWait(svTorDLDir ^ svTorInstallFile, "", LAAW_OPTION_WAIT_INCL_CHILD) < ISERR_SUCCESS) then
MessageBox("Could not install Tor", SEVERE);
endif;
///////////////////////////////////////////////////////////////////////////////
// delete the downloaded files
///////////////////////////////////////////////////////////////////////////////
nvResult = DeleteDir(svTorDLDir, ALLCONTENTS);
end;
If you're not trying to run another installer, once you download the files, you can script whatever you need to do.
Hope this helps.
Leigh
‎Feb 01, 2008
01:07 PM
What if you just have an InstallScript project? I'd like to do a similar thing, and although the FeatureGetData function allows you to access the ftp location associated with a particular feature, I haven't been able to figure out how to use this attribute to install the feature from a remote location like an ftp site. Do you have to use a Script-Created Feature Set? If anyone has done this (or knows how), I would really appreciate your help.
Thanks!
Thanks!
‎Feb 05, 2008
12:21 PM
Hey Leigh.
What do you mean by set a feature to either ftp or http? by doing so, the files won't be in the installer exe?
also, do you need to place the feature's files in the ftp location manually, or InstallShield does it for you, once compiling?
thanks
Guy
What do you mean by set a feature to either ftp or http? by doing so, the files won't be in the installer exe?
also, do you need to place the feature's files in the ftp location manually, or InstallShield does it for you, once compiling?
thanks
Guy
‎Feb 19, 2008
05:55 PM
I haven't tried something like this in a pure Installscript project, so I really don't know what differences (if any) you're going to face. I'd like to think that since the script above is all InstallScript code, you should be able to use it without a problem.
The few times I've used this code, I've always downloaded a setup file from the HTTP location and then run the installer that I just downloaded using the LaunchAppAndWait function. I've never tried using an Install From Web approach.
I also haven't tried to create a feature via scripts, but would also be interested in learning how.
Guy, When I mentioned setting the feature to FTP or HTTP, there's a feature property called 'FTP Location' and 'HTTP Location' that I set to the appropriate URL. I then use this value in the script. And no, the files referenced in the FTP/HTTP location will not be included in the installer exe file. But you will need to manually upload them to an FTP or HTTP server.
Leigh
The few times I've used this code, I've always downloaded a setup file from the HTTP location and then run the installer that I just downloaded using the LaunchAppAndWait function. I've never tried using an Install From Web approach.
I also haven't tried to create a feature via scripts, but would also be interested in learning how.
Guy, When I mentioned setting the feature to FTP or HTTP, there's a feature property called 'FTP Location' and 'HTTP Location' that I set to the appropriate URL. I then use this value in the script. And no, the files referenced in the FTP/HTTP location will not be included in the installer exe file. But you will need to manually upload them to an FTP or HTTP server.
Leigh