Thanks Bob. I appreciate your response.
Yes, I took your advice to add this
"xmlns:iis='http://schemas.microsoft.com/wix/IIsExtension'" in the namespace, I
also added WixIIsExtension.
Then the "error CNDL0104" problem is gone. I can at least compile it. But after
compile/link, I got a new error:
error LGHT0204: ICE18: KeyPath for Component: 'Cert' is Directory:
'INSTALLLOCATION'. The Directory/Component pair must be listed in the
CreateFolders table.
So I added <CreateFolder/>, here is the updated code:
<Component Id="Component_MyCert" Guid='...'>
<CreateFolder/>
<iis:Certificate Id="MyCert"
Name="Component_MyCert_File"
StoreLocation="localMachine"
Request="no"
CertificatePath="[INSTALLDIR]MyCert.p7c"
StoreName="root"/>
</Component>
This time, I can compile and link without problem. But I got error when
installing the software. Here is the log:
InstallCertificates: Error 0x8000ffff: Unexpected certificate type read from
disk.
InstallCertificates: Error 0x8000ffff: Failed to read certificate from file
path.
InstallCertificates: Error 0x8000ffff: Failed to resolve certificate: MyCert
Then I thought maybe the Certificate component shouldn't be under "Directory"
element because it's not part of the "Directory". Maybe I am wrong? Anyways, I
tried to move it out of the "Directory". Here is the new code:
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='MyProduct'>
<Component Id="Component_MyCert_File" Guid="...">
<File Source="MyCert.p7c" KeyPath="yes" Checksum="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
....
<Component Id="Component_MyCert" Guid='...'>
<CreateFolder/>
<iis:Certificate Id="MyCert"
Name="Component_MyCert_File"
StoreLocation="localMachine"
Request="no"
CertificatePath="[INSTALLDIR]MyCert.p7c"
StoreName="root"/>
</Component>
I compiled it and linked it again. But I still got error when installing. The
errors are the same:
InstallCertificates: Error 0x8000ffff: Unexpected certificate type read from
disk.
InstallCertificates: Error 0x8000ffff: Failed to read certificate from file
path.
InstallCertificates: Error 0x8000ffff: Failed to resolve certificate: MyCert
Action ended 11:29:06: InstallCertificates. Return value 3.
I did manually install the certificate by using Internet Explorer. So I'm sure
the certificate itself is fine.
Basically, I have two questions:
1. Should "iis:certificate" be part of the "Directory" element? If so, where I
should put the "iis:certificate"?
2. What is the meaning of those error messages? How to fix it?
Can someone provide a solution? I appreciate it.
Thank you all,
/Brian
________________________________
From: Bob Arnson <[email protected]>
To: General discussion for Windows Installer XML toolset.
<[email protected]>
Sent: Saturday, February 28, 2009 1:43:50 PM
Subject: Re: [WiX-users] WiX 3.0: How to install a Root Certificate
Little Forest wrote:
> error CNDL0104: Not a valid source file; detail: 'iis' is an undeclared
> namespace.
>
You need to declare the IIS extension namespace and add the
WixIIsExtension to your project.
--
sig://boB
http://joyofsetup.com/
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
__________________________________________________________________
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo!
Canada Messenger at http://ca.beta.messenger.yahoo.com/
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users