Ryan,

Where do you have a file with @Id of "FileId" defined? I register an
extension as shown:

<Component Id="ExeFile" Guid="...">
  <File Id="FileId" Source=" MyApp.exe" />
  <ProgId Advertise="no" Id="MyApp.MyExt.1" Icon="FileId" IconIndex="1"
Description="MyApp File" >
    <Extension Id="myext" ContentType="application/xml">
      <Verb Id="open" TargetFile="FileId" Argument="&quot;%1&quot;" />
    </Extension>
  </ProgId>
</Component>

Notice that I have the file and the extension both in the same
component. Perhaps this isn't required, but it makes sense to me since
they must go together for my application, but perhaps other apps want
the extension to be optional. 

Notice that both ProgId/@Icon and Verb/@TargetFile refer to File/@Id,
which WiX 3.0 will convert to "[#FileId]" in the MSI file, which will be
the full installed filepath in the registry after installation.
[#FileId] is nearly equivalent to [!FileId], except the latter uses
short filenames. Notice that WiX includes the double-quotes around the
[#FileId] to avoid problems with spaces in the path.

There are some warnings in the MSI documentation about [#FileId] only
being resolved if the component installing the file has already been
installed, so perhaps that has something to do with your problem.

--Quinton

-----Original Message-----
From: Ryan Dai [mailto:ryan...@hotmail.com] 
Sent: Wednesday, July 08, 2009 4:23 PM
To: Wix; b...@joyofsetup.com
Subject: Re: [WiX-users] How to register file type with wix 3 RTM?


Hi Bob,
 
Thanks for your answer.
After I remove the Sequence attribute, I still get errors.
 
            <Component Id="myfile"
Guid="8E4C47A3-4CDB-4c2c-A783-0B21747DFC3C">
                <ProgId Id="myfileid">
                    <Extension Id="my" ContentType="application/text">
                        <Verb Id="open" Command="open"
TargetFile="FileId" Argument="&quot;%1&quot;" />
                    </Extension>
                </ProgId>
            </Component>
 
error LGHT0094 : Unresolved reference to symbol 'File:FileId'
 
Wixcop changed my original Target = "[!FileId]" to TargetFile="FileId".
So in wix 2, it works if we specify:
 
            <Component Id="myfile"
Guid="8E4C47A3-4CDB-4c2c-A783-0B21747DFC3C">
                <ProgId Id="myfileid">
                    <Extension Id="my" ContentType="application/text">
                        <Verb Id="open" Command="open"
Target="[!FileId]" Argument="&quot;%1&quot;" />
                    </Extension>
                </ProgId>
            </Component>
 
I think our orginal intention is just to register a file type for an
editor of our Visual Studio package. So it seems like there is no
something about "the target file to be executed for the verb".
 
> Date: Wed, 8 Jul 2009 07:51:20 -0400
> From: b...@joyofsetup.com
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] How to register file type with wix 3 RTM?
> 
> Ryan Dai wrote:
> > error CNDL0035 : The Verb/@Sequence attribute cannot 
> > be specified when attribute Advertise is present with value 'no'.
> > 
> 
> If you have only a single Verb element, just omit the Sequence 
> attribute. WiX v2 accepted the Sequence attribute when Advertised="no"

> but did nothing with it; WiX v3 is more strict and doesn't just throw 
> away what you give it.
> 
> -- 
> sig://boB
> http://joyofsetup.com/
> 
> 
> 
>
------------------------------------------------------------------------
------
> Enter the BlackBerry Developer Challenge 
> This is your chance to win up to $100,000 in prizes! For a limited
time, 
> vendors submitting new applications to BlackBerry App World(TM) will
have
> the opportunity to enter the BlackBerry Developer Challenge. See full
prize 
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

_________________________________________________________________
Windows Live(tm): Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
------------------------------------------------------------------------
------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,

vendors submitting new applications to BlackBerry App World(TM) will
have
the opportunity to enter the BlackBerry Developer Challenge. See full
prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to