The script fails to run even when it does nothing:

Sub myFunction()
End Sub

However, when I embed the vbscript into a custom action, it works:

<CustomAction Id="testVBScript" Script="vbscript" Execute="immediate" >
    <![CDATA[
        msgbox "Hello World"
    ]]>
</CustomAction>

It's only when I try to call it externally that it fails - even when my
antivirus is turned off.

I tried to keep the example as simple as possible, but, I'd really like to
see any code that successfully calls an external script. 

-----Original Message-----
From: Michael Stoll [mailto:unwicht...@mistoll.de] 
Sent: Friday, June 17, 2011 4:27 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] External Custom Action Not Working

AFAIK the msi engine does use a special host. So a vbs which runs with 
wscript may be invalid with the msi scripting host.

I once created a vbs custom action. If I remeber correctly the msi host 
does not support msgbox function.

Michael

Am 17.06.2011 00:06, schrieb Roy Clemmons:
> I hope this didn't post twice. I didn't see it in the forum, but, forgive
me
> if this is a duplicate.
>
> All I'm trying to do is execute an external vbscript using a custom
action.
> It doesn't seem to work. A search on the forum reveals I'm not the only
one
> experiencing this problem.  Someone providing a solution would provide a
> great example for those of us with the problem and for future reference.
>
> The two files are included below. Can anyone get this to work?
>
> Product.wxs
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>    <Product
>         Id="B55596A8-93E3-47EB-84C4-D7FE07D0CAF4"
>         Name="Test"
>         Language="1033"
>         Version="2.0.0.0"
>         Manufacturer="Test Company"
>         UpgradeCode="B414C827-8D81-4B4A-B3B6-338C06DE3A11">
>
>      <Package InstallerVersion="301" Compressed="yes" />
>
>      <UIRef Id="WixUI_Minimal" />
>
>      <Binary Id="myScriptVBS" SourceFile="myScript.vbs" />
>      <CustomAction Id="myScript_CA" BinaryKey="myScriptVBS"
> VBScriptCall="myFunction"></CustomAction>
>
>      <InstallUISequence>
>        <Custom Action="myScript_CA"  After="LaunchConditions" />
>      </InstallUISequence>
>    </Product>
> </Wix>
>
> myScript.vbs
> Sub myFunction()
>         msgbox "Hello, World!"
> End Sub
>
> Thanks in advance.
>
>
>
----------------------------------------------------------------------------
--
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>


----------------------------------------------------------------------------
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to