Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Evaluating string expression for CA


2 replies to this topic

EricFowler

EricFowler
  • Members
  • 2 posts

Posted 31 March 2001 - 22:54

I need to pass a parameter to a Standard DLL, which I have defined. The parm needs to be the INSTALLDIR with a concatenated file name. I am unable to specify the parameter to get the [INSTALLDIR] expression evaluated and the file name concatenated.

Here's what I do:
Create custom DLL, prototyped to accept a const char * (can't seem to pass UNICODE)

Splice it into a custom action, like so:
NUMBER=[MyVar] swsetup::?InstallDriverFiles@@YGHPBD@Z(in STRING=[INSTALLDIR] ascsipt.inf)

The function name is 'InstallDriverFiles' plus name decoration. The parameter is supposed to add the file name to the INSTALLDIR. Problem is, it doesn't - I get either a literal "[INSTALLDIR]\NASCSIPT.INF" or an empty string.

I have been experimenting with [ ]'s and custom properties and the '+' operator to no avail ...
If the user chooses directory 'C:\mydir', I just want to pass 'c:\mydir ascsipt.inf' as a string to the DLL.

BTW the function is getting called so it is not a name export problem, and a string literal hardcoded into the CA is passed down OK. The problem is expression evaluation ...

Thanks.


SteveK

SteveK
  • Members
  • 14 posts

Posted 02 April 2001 - 21:31

Instead of using "...[INSTALLDIR] ascsipt.inf) ", pass "...[INSTALLDIR]nascsipt.inf)".  Properties in square brackets do not need the backslash "\".  I don't think it applies in this case but.... you may have to convert to a short path.