Bugs item #1340394, was opened at 2005-10-28 00:54
Message generated for change (Settings changed) made by robmen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1340394&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: candle
Group: v2.0
>Status: Closed
Resolution: Fixed
Priority: 9
Submitted By: Riko Eksteen (rikoe)
Assigned to: Derek (derekc)
Summary: Script function not optional for script custom actions

Initial Comment:
According to the Windows Installer SDK, the Target
column for type 5/6 and 21/22 custom actions (VBScript
and JScript file in the binary table or installed with
the product) can contain an OPTIONAL script function to
call.

The way to define these custom actions is to use the
BinaryKey/FileKey attribute together with the
JScriptCall/VBScriptCall attributes, but the compiler
does not allow the JScriptCall/VBScriptCall attribute
to be an empty string, meaning that a script function
always has to be defined.

I suggest that to fix this, the
VBScriptCall/JScriptCall attributes can be defined as
the empty string, which would indicate that the script
should just be run without calling a specific function.

----------------------------------------------------------------------

Comment By: Derek (derekc)
Date: 2005-11-01 19:32

Message:
Logged In: YES 
user_id=518766

This should be fixed in the next drop.

----------------------------------------------------------------------

Comment By: Derek (derekc)
Date: 2005-11-01 09:25

Message:
Logged In: YES 
user_id=518766

Ah ok, now I see the problem: VBScriptCall is working (I
believe this is the one I looked at), but JScriptCall is
broken.  If VBScriptCall doesn't work for you then you're
using an incredibly old build (this attribute has worked
since at least May).

Please don't use the single space hack (it may have
unintended side-effects).  We'll fix this bug for the next drop.

----------------------------------------------------------------------

Comment By: Riko Eksteen (rikoe)
Date: 2005-11-01 04:32

Message:
Logged In: YES 
user_id=1048532

I still don't think this works...

If I use the following code:

<CustomAction Id="MyScript" BinaryKey="rawscript.js"
JScriptCall="" Execute="immediate" Return="check" />

I get the following compilation error:

error CNDL0006: The CustomAction/@JScriptCall attribute's
value cannot be an empty string.  If you want the value to
be null or empty, simply remove the entire attribute.

If I remove the attribute, I get an invalid custom action
(there is already a seperate incident for this), if I add
text, it becomes the name of the function to call in the
Target column of the CustomAction table, meaning that the
function name is not optional.

It does seem as if inserting a space for the JScriptCall
attribute will actually create an empty entry in the Target
column. 

Like so:
<CustomAction Id="MyScript" BinaryKey="rawscript.js"
JScriptCall=" " Execute="immediate" Return="check" />

But if this is the intended behaviour it is both
undocumented and counter-intuitive. Especially since adding
a space in front of a function name actually persists the
space in the final database.

----------------------------------------------------------------------

Comment By: Derek (derekc)
Date: 2005-10-29 16:14

Message:
Logged In: YES 
user_id=518766

In the code that I'm looking at, this is supported.  If you
can still see the problem with the latest build, could you
please re-open the bug and provide the exact xml that is
causing an error as well as the version of candle that you
are using?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1340394&group_id=105970


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to