Page 2 of 2
Posted: Fri Dec 10, 2004 9:15 am
by [MS]Mark
hmm - that's seems ok but when I create the DSN, the attribute I'm using ODBCLOC with isn't being populated...even though ODBCLOC is holding the directory I want (I'm doing a message box on the line before the CREATE ODBC DSN to check)...the attribute is SourceDB=[ODBCLOC] which has worked when hardcoding the ODBCLOC value.
Posted: Fri Dec 10, 2004 11:14 am
by sinan
I don't get it...this happened after using TARGETDIR to temporarily store the ODBCLOC variable

Posted: Fri Dec 10, 2004 11:25 am
by [MS]Mark
The process as it stands is:
* before the Wizard Loop starts, store TARGETDIR and set ODBCLOC to empty
* in Wizard Loop, display the ODBC_Location dialogue which uses TARGETDIR to store the path
* first thing in the Main Install, store TARGETDIR to ODBCLOC and restore the old TARGETDIR
* display a message box showing what TARGETDIR and ODBCLOC contain (always shows the right values for the 2 variables)
* perform file copy and shortcut setup
* Create ODBC DSN using ODBCLOC
when it creates the DSN using this method, the attribute I'm setting to ODBCLOC is empty. If I hard code a path to ODBCLOC and run, that value is output...
Posted: Fri Dec 10, 2004 12:01 pm
by sinan
When you say hardcode a path to ODBCLOC, what do you mean? Do you mean setting ODBCLOC to a pre-defined path using the Set Variable command? Or, do you instead mean using no variable in the field and hard-coding a path directly into the DSN command?
How are you setting ODBCLOC to TARGETDIR, you should use Set Variable with the $TARGETDIR$ value...
Posted: Fri Dec 10, 2004 12:11 pm
by [MS]Mark
sinan wrote:When you say hardcode a path to ODBCLOC, what do you mean? Do you mean setting ODBCLOC to a pre-defined path using the Set Variable command? Or, do you instead mean using no variable in the field and hard-coding a path directly into the DSN command?
Using the Set Variable command as test to see if the Create ODBC DSN would work with a custom variable...
How are you setting ODBCLOC to TARGETDIR, you should use Set Variable with the $TARGETDIR$ value...
yep - using:
Set Variable BTARGET to $TARGETDIR$
to store the TARGETDIR
and
Set Variable ODBCLOC to $TARGETDIR$
Set Variable TARGETDIR to $BTARGET$
to store the selected ODBC directory and restore the previous TARGETDIR...
As mentioned, doing a message dialogue just after this is showing the right values in both variables - it's just that the Create ODBC DSN isn't taking ODBCLOC's value when doing it this way...
Posted: Fri Dec 10, 2004 12:25 pm
by sinan
I just ran a small test.
I created an ODBC DSN using two different variables:
1) [TARGETDIR]\\mydatabase.mdb
2) [TARGETDIREX]\\mydabase.mdb
Where I set TARGETDIREX to $TARGETDIR$ using the Set Variable command.
I think I see what is going wrong - the variable substitution is failing when a variable other than TARGETDIR is used with the ODBC commands (the commands which dereference variables using [], instead of $$).
A fix is available. Download the file
http://www.installaware.com/miastub.exe and place it inside the interop subfolder of your InstallAWARE installation folder, and rebuild your setup. Be sure to run without debugging, and you will see it working properly.
Posted: Mon Dec 13, 2004 3:46 am
by [MS]Mark
That seems to be working now

Posted: Mon Dec 13, 2004 6:21 am
by sinan
Glad to hear it

Posted: Mon Dec 13, 2004 9:21 am
by [MS]Mark
Quick query - if we purchased InstallAware Enterprise now (or more likely tomorrow) would this fix be included or would we have to overwrite it...?
Posted: Mon Dec 13, 2004 5:08 pm
by sinan
It would be included. Our online license delivery mechanism provides a custom "InstallAWARE Licensing Wizard" specifically made for your company. You just run that wizard any time you wish to convert a trial to a full license.
In the future when we release updates to InstallAWARE, all you need to do is install the new trial, log on to the license delivery website, regenerate your new licensing wizard, and install it. You will always have the latest version of InstallAWARE with no need to wait for us to deliver you anything manually - the web delivery system is automated.
Powered by InstallAWARE Automation

Posted: Tue Nov 01, 2005 10:56 am
by [MS]Mark
[MS]Mark wrote:sinan wrote:When you say hardcode a path to ODBCLOC, what do you mean? Do you mean setting ODBCLOC to a pre-defined path using the Set Variable command? Or, do you instead mean using no variable in the field and hard-coding a path directly into the DSN command?
Using the Set Variable command as test to see if the Create ODBC DSN would work with a custom variable...
How are you setting ODBCLOC to TARGETDIR, you should use Set Variable with the $TARGETDIR$ value...
yep - using:
Set Variable BTARGET to $TARGETDIR$
to store the TARGETDIR
and
Set Variable ODBCLOC to $TARGETDIR$
Set Variable TARGETDIR to $BTARGET$
to store the selected ODBC directory and restore the previous TARGETDIR...
As mentioned, doing a message dialogue just after this is showing the right values in both variables - it's just that the Create ODBC DSN isn't taking ODBCLOC's value when doing it this way...
I've just had to reinstall InstallAware Enterprise 3 - I've added in the miastub.exe as it wasn't working but for some reason I am getting the same problem as before still (nothing has changed code-wise)...any ideas?
(sorry for dragging this out of the depths of the past - just trying to get things back to normal...)
Posted: Tue Nov 01, 2005 12:14 pm
by sinan
Enterprise 3 is two versions out of date! Please upgrade to the latest version of InstallAware. I believe the ODBC issue is resolved in InstallAware 2005 Second Edition (the latest version).
Not substituting Varaibles
Posted: Tue Oct 21, 2008 3:33 am
by ulrichard
I have the same problem with InstallAware 8.
The Create ODBC DSN command won't substitute custom variables. I can't use TARGETDIR for the name of the SQL server because I use TARGETDIR for the location where the files have to be installed.
InstallAware support doesn't seem to care.
So at the moment I write the correct value to the registry after ApplyInstall with the "Write Registry Persistent" Plugin I found here on the forum.
Attached is a small script to demonstrate the behavior.
Rgds
Richard
File Attached:
My Project2.mia