Hi All (again),
So I've got my sql scripts executing now, but the scripts that insert default data into my tables aren't working properly. Specifically, the data inserted isn't having variables replaced with their values.
For example, in some cases I insert the value $TARGETDIR$\\Installations\\1 into a table. When I check the database after install, the column contains $TARGETDIR$\\Installations\\1 instead of c:\\program files\\myapplication\\Installations\\1. There are a number of other values (machine names, IP Addresses, user entered values) that I also want to replace in various insert statements.
It's worth noting the scripts I'm running are loaded using the #FILESCRIPT# syntax. Do scripts executed this way support variable replacement ? If not, why not and how can I get around this ? The scripts are very large and I don't want to embed them in the install itself because of the problem where large scripts make the install look like it's hung.Am I doing something wrong ?
Thanks.
Variables Not Replaced In Sql Script ?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
This is a known issue with the current version and has been fixed. You have two alternatives:
1) Use the attached, updated plug-in DLL. Place this in your InstallAware\\Plug-Ins\\MS SQL Server folder, overwriting the old copy of the DLL. Then rebuild your setups and test again.
2) Use the EditFile plug-in to replace variables before calling your script. This is a workaround you may use without having to update the product DLL.
File Attached:
mMSSQLExec.zip
1) Use the attached, updated plug-in DLL. Place this in your InstallAware\\Plug-Ins\\MS SQL Server folder, overwriting the old copy of the DLL. Then rebuild your setups and test again.
2) Use the EditFile plug-in to replace variables before calling your script. This is a workaround you may use without having to update the product DLL.
File Attached:
mMSSQLExec.zip
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 175 guests