Hi Justin,

Thank you for your reply. I was pretty sure that I already tried what
you are suggesting but I tried it again anyway. Unfortunately it didn't
work again. :(

There is an important piece of information that I forgot to mention -
the associations and the icons do not work at on Vista. I just tried my
original code on XP and they all worked.

So, it looks like Vista does not like my code (which is a close copy
from the tutorial). Someone mentioned to me that probably this has
something to do with Vista's "Default Programs". I would be very
surprised if 2.0.4820 has any support for that but what about a
workaround or may be a newer version?

If anyone out there has any idea, I'll be grateful if you'd share it on
this forum.

Thank you
Val Melamed

-----Original Message-----
From: Justin Dearing [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 01, 2007 12:51 PM
To: Valentin I. Melamed
Subject: Re: [WiX-users] Help with file associations

On 4/1/07, Valentin I. Melamed <[EMAIL PROTECTED]> wrote:
> I have a problem with file associations - can you tell me please what
I am
> doing wrong here:
>
> <Component Id="component0" DiskId="1"
> Guid="597C3CAE-C03D-48DA-AF29-6D3917CD88C1">
>
>       <File Id="file0" Name="prgrm.exe" Vital="yes"
> src="$(var.srcDir)prgrm.exe" />
>
> </Component>
>
> <Component Id="component0.3" DiskId="1"
> Guid="751C4A6D-C365-4b21-8D6F-048969F3E72C">
>
>       <Condition>ASSOCIATECSS=1</Condition>
>
>       <File Id="cssicon" Name="aptcss.ico" Vital="yes"
> LongName="prgrm_file_css.ico" src="Bitmaps\prgrm_file_css.ico" />
>
>       <ProgId Id="prgrm.cssfile" Description="Cascading Style Sheet
> Document" Icon="cssicon">
>
>             <Extension Id="css" ContentType="application/css" >
>
>                   <Verb Id="open" Command="Open" Target="[!file0]"
> Sequence="10" Argument='"%1"' />
>
>             </Extension>
>
>       </ProgId>
>
>       <Registry Id="prgrmAssoc.cssfile1" Action="write" Type="string"
> Root="HKCR" Key=".css" Value="prgrm.cssfile" />
>
>       <Registry Id="prgrmAssoc.cssfile2" Action="write" Type="string"
> Root="HKCR" Key="prgrm.cssfile"
Value="$(loc.AssociationsDlgAssocCss)"/>
>
>       <Registry Id="prgrmAssoc.cssfile3" Action="write" Type="string"
> Root="HKCR" Key="prgrm.cssfile\DefaultIcon"
> Value="[INSTALLDIR]prgrm_file_css.ico"/>
>
> </Component>
>
>
> The file icon is not set and the association does not work...
Don't manipulate the registry use the Verb element under the extension
elemetn under the ProgId element. This is what I do for
PlaneDisaster.NET:

<!-- Begin File associations -->
        <ProgId Id="PlaneDisaster.mdbfile" Description="JetSQL Database"
Icon="&quot;[#MainExecutable]&quot;">
                <Extension Id="mdb">
                        <Verb Id="open"
Target="&quot;[#MainExecutable]&quot;"
Argument="&quot;%1&quot;" />
                </Extension>
        </ProgId>
        <!-- We dont want to associate with MDE files. Let MS Access or
the
Access runtime handle that.
        TODO: Figure out how to add an application to "Open With"
without
making it the default association.
        <ProgId Id="PlaneDisaster.mdefile" Description="MS Access
Application" Icon="&quot;[#MainExecutable]&quot;">
                <Extension Id="mde">
                        <Verb Id="open"
Target="&quot;[#MainExecutable]&quot;"
Argument="&quot;%1&quot;" />
                </Extension>
        </ProgId>
        -->
<!-- End File associations -->

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to