In the last few wix versions, no guid is the same as *. To get no guid at all you have to explicitly use Guid="".
-----Original Message----- From: Phil Wilson [mailto:phil.wil...@mvps.org] Sent: 17 January 2013 19:21 To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Using Microsoft.Deployment.WindowsInstaller Followup Well your WiX is very minimal. The example component at sourceforge is this: <DirectoryRef Id="APPLICATIONROOTDIRECTORY"> <Component Id="myapplication.exe" Guid="PUT-GUID-HERE"> <File Id="myapplication.exe" Source="MySourceFiles\MyApplication.exe" KeyPath="yes" Checksum="yes"/> </Component> <Component Id="documentation.html" Guid="PUT-GUID-HERE"> <File Id="documentation.html" Source="MySourceFiles\documentation.html" KeyPath="yes"/> </Component> </DirectoryRef> Where there is both a guid and a keypath. I don't know what WiX does when you don't specify a guid, I'd need to look in the MSI file, but it's possible that those components have no guid at all, and that's supported - it just means you don't want Windows to manage those files, and that also means that the APIs won't return any info about them. Just follow the example! Phil -----Original Message----- From: tyler.w.r...@accenture.com [mailto:tyler.w.r...@accenture.com] Sent: Wednesday, January 16, 2013 6:20 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Using Microsoft.Deployment.WindowsInstaller Followup Phil, Thank you for the quick response I have pasted a more thorough example of the components below. Basically what I think I need to do is make sure every is in their own component with a keypath? <Fragment> <DirectoryRef Id="ExampleUserAdminApp_ThemesAvantGardecss"> <!--[TARGETDIR]\SourceDir\[InstallDirName]\ExampleUserAdmin\App_Themes\Avant Garde\css--> <Component Id="css01_reset.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\01_r eset.css" /> </Component> <Component Id="css02_extallnotheme.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\02_e xt-all-notheme.css" /> </Component> <Component Id="css03_dctExtJsExtensions.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\03_d ctExtJsExtensions.css" /> </Component> <Component Id="css04_dctExtJsOverrides.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\04_d ctExtJsOverrides.css" /> </Component> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="$(var.PlatformProgramFilesFolder)"> <Directory Id="INSTALLLOCATION" Name="!(loc.ProductManufacturerFolderName)" > <Directory Id="Documentation" Name="Documentation" /> <Directory Id="ExampleUserAdmin" Name="ExampleUserAdmin"> <Directory Id="ExampleUserAdminApp_Data" Name="App_Data" /> <Directory Id="ExampleUserAdminApp_Themes" Name="App_Themes"> <Directory Id="ExampleUserAdminApp_ThemesAvantGarde" Name="AvantGarde"> <Directory Id="ExampleUserAdminApp_ThemesAvantGardecss" Name="css" /> <Directory Id="ExampleUserAdminApp_ThemesAvantGardeimages" Name="images"> <Directory Id="ExampleUserAdminApp_ThemesAvantGardeimagesbuttons" Name="buttons" /> <ComponentGroup Id="ExampleUserAdmin_App_Themes_Files"> <ComponentRef Id="AvantGarde.skin.component" /> <!-- AvantGarde\css folder--> <ComponentRef Id="css01_reset.css.component" /> <ComponentRef Id="css02_extallnotheme.css.component" /> <ComponentRef Id="css03_dctExtJsExtensions.css.component" /> <ComponentRef Id="css04_dctExtJsOverrides.css.component" /> <ComponentRef Id="css05_extxthemegray.css.component" /> <ComponentRef Id="css06_dctExtxthemegray.css.component" /> <ComponentRef Id="css07_style.css.component" /> <ComponentRef Id="css08_forms.css.component" /> <ComponentRef Id="css09_leftNav.css.component" /> <ComponentRef Id="css10_buttons.css.component" /> <ComponentRef Id="css11_nav.css.component" /> <ComponentRef Id="css12_theme.css.component" /> <Feature Id="MainFeature" Title="!(loc.MainFeature_Title)" Description="!(loc.MainFeature_Desc)" Level="1"> <ComponentGroupRef Id="Documentation_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_Files"/> <ComponentGroupRef Id="ExampleUserAdmin_App_Data_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_App_Themes_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_Bin_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_CSS_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_Images_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_Scripts_Files" /> <ComponentGroupRef Id="ExampleUserAdmin_XSLT_Files" /> <ComponentGroupRef Id="Util_Files" /> <ComponentGroupRef Id="ProductConfigFolder_Files" /> <ComponentGroupRef Id="TransformerComponents"/> <ComponentGroupRef Id="ECU"/> <ComponentRef Id="ShortcutFolders.component"/> <ComponentRef Id="RegistryEntries.component"/> <!--Dummy components--> <ComponentGroupRef Id="ToBeRemovedNextMajorComponentGroup"/> </Feature> That is all the info for those specific components. If it is a problem with our Wix I can get it fixed as we have amajor release coming up soon so ideally we would like to fix it before that comes along. Again thank you for the help. Message: 4 Date: Tue, 15 Jan 2013 12:50:13 -0800 From: "Phil Wilson" <phil.wil...@mvps.org<mailto:phil.wil...@mvps.org>> Subject: Re: [WiX-users] Using Microsoft.Deployment.WindowsInstaller. To: "'General discussion for Windows Installer XML toolset.'" <wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>> Message-ID: <sig.3727184300.sig.2727901a14.AA7BC309983A47CFABA0EF74D6D3ECDA@PhilPC<mailt o:sig.3727184300.sig.2727901a14.AA7BC309983A47CFABA0EF74D6D3ECDA@PhilPC>> Content-Type: text/plain; charset="us-ascii" For these APIs to work in the way you want each file must be in its own component. You're enumerating components by component guid, and what you'll get returned is the key path file in the component. If the component contains a bunch of other files it can't tell you. The key file needs to be there, obviously. That's the big picture, and I can't tell from your WiX whether each of the files you have is a key file, but I see no KeyPath spec there. Phil -----Original Message----- From: tyler.w.r...@accenture.com<mailto:tyler.w.r...@accenture.com> [mailto:tyler.w.r...@accenture.com] Sent: Tuesday, January 15, 2013 12:18 PM To: wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net> Subject: [WiX-users] Using Microsoft.Deployment.WindowsInstaller. 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_e xt-all-notheme.css" /> </Component> <Component Id="css03_dctExtJsExtensions.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\03_d ctExtJsExtensions.css" /> </Component> <Component Id="css04_dctExtJsOverrides.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\04_d ctExtJsOverrides.css" /> </Component> <Component Id="css05_extxthemegray.css.component"> <File Source="net\exampleuseradmin\exampleuseradmin\app_themes\avantgarde\css\05_e xt-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<mailto:tyler.w. r...@accenture.com%3cmailto:tyler.w.r...@accenture.com>> | www.accenture.com/pcsoftware<http://www.accenture.com/pcsoftware<http://www. accenture.com/pcsoftware%3chttp:/www.accenture.com/pcsoftware>> 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 Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ----------------------------------------------------------------------------- - Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ 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_122812 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users