Hi

I'm currently trying to create an installer for an ASP .NET 4 application.  
Using VS2010, WIX 3.5, .NET 4, on Win7 64bit.

The current step I'm stuck on is that I want to display a list of web sites to 
the user to pick from in a dropdown list.  From what I can google (there's a 
lot of noise!), there is no 'easy/inbuilt' way so I need to make use of a 
custom action?

Given this 'assumption', I came across the following that looked like it should 
do the job:

http://stackoverflow.com/questions/1346852/in-wix-how-can-i-select-an-iis-website-by-name

However, I currently cannot get this to work with the log indicating the js 
file is not found:

"There is a problem with this Windows Installer package. A script required for 
this install to complete could not be run. Contact your support personnel or 
package vendor.  Custom action EnumerateWebSites script error -2146823279, 
Microsoft JScript runtime error: '' is undefined Line 1, Column 1,

Action ended 11:10:51: EnumerateWebSites. Return value 3."

I have added a file called CustomActions.js...I was unsure of the properties to 
set, but have tried various (atm Build Action: none, Copy to Output Dir: 
always).

My Product.wxs has:

    <InstallUISequence>
      <Custom Action="EnumerateWebSites" After="CostFinalize" 
Overridable="yes">NOT Installed</Custom>
    </InstallUISequence>

Then a WebSites.wxs file:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
       <Fragment>
    <Binary Id="IisScript_CA" SourceFile="CustomActions.js" />

    <CustomAction Id="EnumerateWebSites"
                  BinaryKey="IisScript_CA"
                  JScriptCall="EnumerateWebSites_CA"
                  Execute="immediate"
                  Return="check" />

    <CustomAction Id="UpdatePropsWithSelectedWebSite"
                  BinaryKey="IisScript_CA"
                  JScriptCall="UpdatePropsWithSelectedWebSite_CA"
                  Execute="immediate"
                  Return="check" />
  </Fragment>
</Wix>

I've tried/questioned the following, but unclear on resolving:-


1.       Changing the properties on the file itself (ie build/copy)

2.       Including paths before the filename in SourceFile (other examples 
indicate this should not be needed though?)

3.       Questioned whether this is an issue due to building/running on a 64 
bit OS and needing to specify Win64="yes" on the CustomAction(s)

I'm also really unsure if this approach should be followed anyway as I've read 
posts/articles that suggest using custom action scripts are bad, and I'm also 
concerned that I'm missing out a better approach available in 3.5 that's hidden 
by the 'noise' of previous version posts...

Any clarification on this subject would be greatly appreciated!
Regards
Paul.
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to