cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
loyalp
Level 5

SQL Scripts - Text Replacement w/Property

MSI InstallScript Project

I would like to use a property that I've set with MsiSetProperty in my Text Replacement for a SQL Script, but it never actually fills in the value.

For instance, in my scripting I have:

MsiSetProperty (ISMSI_HANDLE, "DATAMDF", strMDFPath);

And I have then used GetProperty to retrieve that value and display in a MessageBox, so I know that part is working fine.


In my SQL Script I then have a line like this:

MOVE 'Data' TO ,

And the Text Replacement entry is then:

Find:
Replace: [MASTERMDF]

What am I missing here? I'm pretty sure the property should have brackets around it because I'm using this same technique with [INSTALLDIR] and it works.
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

As a sanity check, how is [MASTERMDF] being set?
0 Kudos
loyalp
Level 5

RobertDickau wrote:
As a sanity check, how is [MASTERMDF] being set?


Ooops, that was just bad copy/paste to this post on my part. 🙂 The last line is actually:

And the Text Replacement entry is then:
Find: Replace: [DATAMDF]
0 Kudos
loyalp
Level 5

Okay, rookie mistake here... 😞

I found the problem.

I didn't exactly have:
MOVE 'Data' TO ,

I actually had:
MOVE 'Data' TO N'%DATAMDF%,

and was trying to replace the %DATAMDF%, but the N' in front there caused it all to fail.

I just had to scour through a verbose log and finally found the issue.
0 Kudos