Page 1 of 1

Running an external \"setup\" from File Bag

Posted: Thu Feb 08, 2007 2:28 pm
by djm
I have a File bag set in "Globals" region of a template I used (win32):

Code: Select all

[DEFINE WEB MEDIA File Bag]
Define File Bag : C:\\somesetup\\*, include files recursively, get runtime location of files into variable SOMESETUP


(this directory contains setup.exe, many other loose files and directories)

First, I'm not sure where or how I should define a "file bag". The in-app help is a bit vague on this and I put it in globals only because it seemed to me like a good place and only stuck a "DEFINE WEB MEDIA File Bag" above it because I got errors when I tried just defining it alone. Is there a style-guide or how-to or doc that describes how one should "add a file bag". I suspect it would include telling me how/where to set up a proper definition and then an example of how to use it. Anyway....the above seems to work, mostly.

So later I call this setup like this (this is what comes out of the paste, but the actual MSICode is one line):

Code: Select all

~InstallAware Clipboard Data~
~Run Program~
~{78240612-2896-4832-A117-0E154407F250}~
~$SOMESETUP$\\setup.exe~
~FALSE~
~~
~TRUE~
~SOMESETUP_RETVAL~


However when I run this setup during my IA install, I get the following error in an (X) error box:

"SETUP cannot proceed because the length of the specified directory path plus the installation folder name exceeds 95 characters. Please shorten one or both below the specified limit and try again."

When I watch the value of $SOMESETUP$, I see a HUGE path being used to refer to the setup:
"C:\\documents and settings\\nnn\\my documents\\ps\\Release\\Uncompressed\\data\\File Bag\\mFileBagIDE.dll\\bag\\"

So the setup is running, but failing due to the artificially created path "required?" by IA when packaging it up. How do I get around this?

Thanks.

Posted: Thu Feb 08, 2007 2:31 pm
by MichaelNesmith
Actually, it would appear the setup you are trying to run has an issue with long paths. Most setups do not have a problem with long paths - which tool was this setup built in?

File Bag runtime locations cannot be changed - I'm afraid there aren't many options left here. You could try to use the Convert Path command and obtain the short path name for the location File Bag returns...that might please your setup.

Posted: Thu Feb 08, 2007 10:05 pm
by djm
MichaelNesmith wrote:Actually, it would appear the setup you are trying to run has an issue with long paths. Most setups do not have a problem with long paths - which tool was this setup built in?


This is apparently an InstallShield .exe. I did convert path and that solved the problem, however I've since encountered a new, related issue.

After my initial testing of File Bag and "Run Program", I realized it would probably make more sense to put this into a prereq, so I created custom check and setup scripts (.mia) following along with this:
http://www.installaware.com/installawar ... s_view.pdf

So I pulled the file bag and run program out into a setup include file:

Code: Select all

Set Variable SOMESETUP to
Set Variable SOMESETUP_RETVAL to
Define File Bag : C:\\somesetup\\*, include files recursively, get runtime location of files into variable SOMESETUP
Convert to Short Path: SOMESETUP
Run Program $SOMESETUP$\\setup.exe  (WAIT)


However, NOW, the file bag does not appear to be working correctly and I'm not sure why. I'm getting a return code of "-1" from my call to setup.exe, which indicates that the file is not found. $SOMESETUP$ filled in by the path to the file bag seems ok, but the actual path shown does not contain any files on disk (it's now different than my original post's path and it is showing "C:\\Program Files\\InstallAware\\InstallAware 6\\Plug-Ins\\File Bag\\bag\".

Posted: Fri Feb 09, 2007 4:31 pm
by MichaelNesmith
djm wrote:This is apparently an InstallShield .exe. I did convert path and that solved the problem, however I've since encountered a new, related issue.


Really? That would be yet another major reason not to use InstallShield :wink:

djm wrote:"C:\\Program Files\\InstallAware\\InstallAware 6\\Plug-Ins\\File Bag\\bag\".


Did you try running setup outside of the IDE?