View Full Version : Download runtime files on demand
09-24-2004, 05:07 AM
I am currently using Version 6 (sorry) but i think this question will apply to both versions.
I want to reduce the size of my setup because it will be a free download, for this reason I wish to minimise the bandwidth.
I am programming with VB6 and would like to remove the VB6 runtime files form the setup. So I would like SetupFactory look to see if they are currently on the machine the program is being installed on. If not then I want setup factory to download them, install them then carry on with my install.
Have you done this before?
Is there an official link to MS for the latest runtime files?
Thanks in advance
09-24-2004, 05:26 AM
Have you looked at the Dependency Modules available in both versions? SUF7 is easier as allows you to look at what it checks for within the code. In SUF6 you can open up the module itself and look there.
You can then check for the relevant registry entries or file versions and then initiate a download (assume from the web) assuming that the criteria is not met.
In SUF6 use the Download File HTTP action or in SUF7 use HTTP.Download with the various tests for connection etc. added.
The Help files and manuals give good explanations.
09-24-2004, 05:39 AM
yes, I have coded a screen for SF6 for this specific purpose. See attached file.
What you need to do to get this to work is this:
1.) On setup startup, search the target's systemdirectory (%sysdir%) for the msvbvm60.dll file
2.) Store the result of the filesearch action in a variable called %FileSearchResult%
3.) Include the attached screen to your setup
The screen is only displayed when %FileSearchResult% = False, which means that it is displayed in case MSVBVM60.DLL was not found on the target system; that indicates, that at least parts of the VB6 runtimes are not installed on the target system. If you want to make it detect any VB6 runtime, you must add some more FileSearch actions (and let it search for all the VB6 runtimes, and not just for the MSVBVM60.DLL), and change the display condition for the screen.
On the screen there is a 'Download' button integrated, which downloads the VB6 runtimes from the Microsoft server, and executes the downloaded file once it has been downloaded.
All your users need to do once the runtimes have been installed: restart the setup of your product.
Hope that helps ...
09-24-2004, 06:52 AM
Many thanks Steve, this is exactly what I was hoping for.
Thanks for making the effort to upload this for me.
09-24-2004, 08:20 AM
Go to Resources > Dependencies in SUF70. Add the VB6 SP6 dependency. Double-click it and take a look at the Detection tab. In there is the code needed to detect VB6 runtimes. Then goto the Installation tab and modify that script to download and run the runtime installer (which is included with SUF70 - "C:\Program Files\Setup Factory 7.0\Dependencies\vb6sp6\VBRun60sp6.exe") there. This way your detection will be integrated into our dependecy section. In fact, if you get this going, be sure to post your script so that others can use it as well.
09-24-2004, 12:32 PM
No problem, Craig. Glad I could help ...
Powered by vBulletin™ Version 4.0.6 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.