File Bag - Files are NOT installed

Got a problem you cannot solve? Try here.
glenharvy
Posts: 167
Joined: Fri Sep 14, 2007 3:53 am

File Bag - Files are NOT installed

Postby glenharvy » Mon Nov 24, 2014 6:54 pm

I have created two File Bags. One for 32bit files and one for 64bit files. Both File Bags are created at build time and are properly deployed to the install machine at install time.

I have confirmed during the installation process that the File Bags exist at the directory pointed to by the appropriate variable as do actual files themselves.

I have set the Install Files command at various positions within my MSICode and have created MessageBoxes confirming the correct variable values immediately before the actual Install Files Command. The MessageBox is displayed correctly. The destination directory does exist when the command is called. For example

Code: Select all

          Set Variable FileBagInstalled to
          Find All Files in path $TARGETDIR$\webserver\abyss.conf, write result into variable FileBagInstalled
          if Variable FileBagInstalled Equals
            if Variable AbyssX2Installed not Equals (Ignore Case) TRUE
              if Variable IsWindows64Bit not Equals (Ignore Case) TRUE
                MessageBox: $TITLE$, Install FileBag
                Install Files FileBagAbyss32bit to $TARGETDIR$\webserver, include subfolders
                else
                Install Files FileBagAbyss64bit to $TARGETDIR$\webserver, include subfolders
              end
            end
          end


No matter where I put the Install Files command, file installation is not actioned.

Can you please advise where I need to place the Install Files command. Indeed, am I using the proper command?

My searches have revealed this to be a not uncommon error on my part but I am unable to resolve it.

Thank you.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: File Bag - Files are NOT installed

Postby FrancescoT » Tue Nov 25, 2014 11:45 am

Dear Glen,

I suppose you haven't read the Install File command documentation 8).

You are experiencing this problem, because you can't use script variables with the "Source Files" parameter of the command.

"These files must exist on your development system and therefore no runtime script variables are allowed in this field. Only a string literal may be used here, but wildcards, compiler variables, and environment variables are supported as part of the string literal. This field will be resolved at compile time to the actual files found on your system by the compiler. Check the Include subfolders if wildcards used checkbox to perform a recursive operation."

Anyway, I don't understand why you want to use a File Bag to include such files with your installer. It's not necessary at all in your case.

It's enough to use the Install File command conditionally as you are already doing, but obviously, you must enter the effective file path of the actual file on your local system.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

glenharvy
Posts: 167
Joined: Fri Sep 14, 2007 3:53 am

Re: File Bag - Files are NOT installed

Postby glenharvy » Tue Nov 25, 2014 7:59 pm

FrancescoT wrote:Dear Glen,
I suppose you haven't read the Install File command documentation 8).

I wish it was as easy as that :-). I've read the documentation many times however the terminology used makes it difficult for me to grasp the full implications of the statements. This is my fault of course but I learn pretty quickly once I grasp the fundamentals. Unfortunately there is no overview of IA that explains the methodology behind IA however after some years of just cutting and pasting I am beginning to understand what happens 'under the sheets' so to speak. I bought IA originally because I didn't have the time nor desire to understand MSI however, with the benefit of hindsight that would seem to be foolish on my part.

Your answer has already lead me to other issues that I don't understand however I will spend a few more days of trial and error and will post any more questions in a separate thread.

Thanks for your patience.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 92 guests