Hello,

        I am currently using the Microsoft.Deployment.WindowsInstaller to check 
some components for an install that I have done. However I have noticed that a 
lot of my components are coming up with the InstallState.Absent state. They are 
mostly images, aspx, and css files, but since they show up as absent I can't 
get the path on disk for them. Below is my test code that I am using to and for 
the absent components I hit the FileNotFoundException , but the installer did 
install them. Is there anyway I can get the path to disk for these files or did 
I do something wrong in the wix to make them show up as absent? Also none of 
these components have the MultiInstance = yes and this install does support 
multi instance, but the product code I am testing with is for instance 0.

public static IEnumerable<ComponentInstallation> GetComponentsForProduct(string 
productCode)
             {
                    return ComponentInstallation.AllComponents.Where(c => 
c.ClientProducts.Any(p => p.ProductCode.Equals(productCode)));
             }

foreach (var componentInstallation in GetComponentsForProduct(productCode))
                    {
                           try
                           {
                                 Console.WriteLine("File: {0}, Version: {1} 
State: {2}", componentInstallation.Path,
                                                   
Installer.GetFileVersion(componentInstallation.Path), 
componentInstallation.State);
                           }
                           catch (FileNotFoundException e)
                           {
                                 Console.WriteLine("Component: {0}, State{1}", 
componentInstallation.ComponentCode, componentInstallation.State);
                           }
                           catch (ArgumentException)
                           {
                                 Console.WriteLine("Component: {0}, State: 
{1}", componentInstallation.ComponentCode, componentInstallation.State);
                           }
                    }


Below is a section of the Wix Code for one of the components that shows up as 
absent.

<Component Id="css02_extallnotheme.css.component">
                           <File 
Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\02_ext-all-notheme.css"
 />
                    </Component>
                    <Component Id="css03_dctExtJsExtensions.css.component">
                           <File 
Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\03_dctExtJsExtensions.css"
 />
                    </Component>
                    <Component Id="css04_dctExtJsOverrides.css.component">
                           <File 
Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\04_dctExtJsOverrides.css"
 />
                    </Component>
                    <Component Id="css05_extxthemegray.css.component">
                           <File 
Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\05_ext-xtheme-gray.css"
 />
                    </Component>

Tyler Reid | Operations and Infrastructure | Accenture Software | P&C Insurance
1807 Jones Street | Bolivar, MO 65613| USA
Office: +cc.xxx.xxx.xxxx | Fax: 417.777.3792
E-Mail: tyler.w.r...@accenture.com<mailto:tyler.w.r...@accenture.com> | 
www.accenture.com/pcsoftware<http://www.accenture.com/pcsoftware>



________________________________
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the e-mail by you is prohibited.

Where allowed by local law, electronic communications with Accenture and its 
affiliates, including e-mail and instant messaging (including content), may be 
scanned by our systems for the purposes of information security and assessment 
of internal compliance with Accenture policy.

______________________________________________________________________________________

www.accenture.com
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to