View Full Version : Help needed getting started with MSI Factory
I have previously been using Setup Factory 6 (and 7) and have just bought MSI Factory but I am having great trouble handling the basics:
1. I need to capture from user not only the Install Folder for programs but also Data folder for data. I have therefore created another dialog with an entry box "MYPROPERTY_DATAFOLDER" and this is associated in Project Settings>Properties to a Property Value of "DataPath". I have then used "DataPath" as the "Folder ID" for a folder which I have defined, but when the installer MSI file runs, the value entered into DataFolder is ignored - what am I doing wrong?
2. In old SetupFactory, I could set each file to "Always overwrite" or "Never Overwrite". I can see how to set "Never Overwrite" but cannot see how to say "Always" so files are overwritten regardless of date stamp.
3. I may well be being stupid here, but how/where can I embed code?
I have tried repeatedly to contact support at IndigoRose but get no response!
Any help much appreciated, before I abandon this product.
Thanks
These issues you are having are quite MSI specific rather than a shortcoming of MSI Factory.
1. I need to capture from user not only the Install Folder for programs but also Data folder for data. I have therefore created another dialog with an entry box "MYPROPERTY_DATAFOLDER" and this is associated in Project Settings>Properties to a Property Value of "DataPath". I have then used "DataPath" as the "Folder ID" for a folder which I have defined, but when the installer MSI file runs, the value entered into DataFolder is ignored - what am I doing wrong?
Here is how I would go about setting this up:
1) Project Settings -> Properties: Create a new one called MSIFACT_INSTALLDIR2 and make the value INSTALLDIR2
2) Go to Project -> Folders: Add your data folder and make the Folder ID: INSTALLDIR2
3) Go to Project -> Dialogs -> InstallDir: Copy and paste the input and the 'change' button.
4) Then go into the input box and change MSIFACT_INSTALLDIR to MSIFACT_INSTALLDIR2
5) Then go into the 'change' button -> Published Events: change the value in _BrowseProperty from [MSIFACT_INSTALLDIR] to [MSIFACT_INSTALLDIR2]
6) Now browse for your data files and point them at INSTALLDIR2
That should get you going.
2. In old SetupFactory, I could set each file to "Always overwrite" or "Never Overwrite". I can see how to set "Never Overwrite" but cannot see how to say "Always" so files are overwritten regardless of date stamp.
This is just how MSI works. There is limited control over specific files in updates.
3. I may well be being stupid here, but how/where can I embed code?
There is no built in scripting for MSI. Any scripts would have to be accomplished using a custom action. There is a LuaScript custom action that will allow you to use Lua.
I have tried repeatedly to contact support at IndigoRose but get no response!
I have looked for reference to any questions from you and cannot find any. The email may be getting blocked or something. I believe that Amanda has replied to your email asking for these questions that are not getting through.
Adam Kapilik
Adam
Thanks for response.
I did not follow your reply "This is just how MSI works. There is limited control over specific files in updates." ..... please could you explain exactly how to get the the relevant place(s) to set the properties for each file to either "Never Overwrite" or "Always Overwrite".
Lorne
07-08-2008, 10:04 AM
There is no such thing as an "Always Overwrite" option for files in the Windows Installer technology. (MSI Factory builds standard Microsoft Windows Installer setup files, also known as "msi files" because they generally end in .msi.)
Microsoft doesn't think old files should ever replace newer ones, so they did not provide any option for that in their file versioning rules. Their component rules state that any new versions of a component must be 100% compatible with the old ones, and if you follow that rule I guess you wouldn't need to ever replace a new component with an old one.
The Microsoft Windows Installer technology has lots of rules and guidelines like that.
There is, however, a workaround. The Windows Installer file versioning rules will prevent an older file from overwriting a new one, because it checks the version stamp of the old file first. You can prevent this check from happening by removing the existing file before you install the one you want.
In other words, use a RemoveFile action to remove the file before it is installed. (By default the RemoveFile actions occur before the files are installed, so all you should have to do is add the action.)
Doing so may not be the most "correct" approach, at least according to Microsoft's rules and guidelines, but it should get the job done.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.