Re: [WiX-users] non-vital files in an installation
Yes, the file would have to exist at compile time if you are going to use a File element. On the media tag for the file, ensure it isn't in an embedded CAB. I believe a Media Tag with no Cabinet attribute would result in the file being expected to be located alongside the source. Since this is an image file, the only thing I can think of that you may have to do at runtime is update the file hash in a custom action. An alternate (and probably easier) option would be to eliminate the File element and then in the CopyFile refer to the file by name. This would mean you would have to add another element in the component to be the key path, such as a registry value. Component Id=CustomLogo Guid=A5FF53DE-4321-42c4-BE39-60F810C9CD69 Condition ![CDATA[LOGOEXISTS]] /Condition RegistryKey Root=HKLM Key=Software\Mfg\AppName Action=createAndRemoveOnUninstall RegistryValue Name=CustomLogo Value=1 Type=integer KeyPath=yes/ /RegistryKey CopyFile Id=customLogoFileCopy SourceDirectory=[SourceDir] SourceName=custom-logo.png DestinationDirectory=APPLICATIONROOTDIRECTORY/ RemoveFile Id=customLogoFileRemove Name=custom-logo.png On=uninstall / /Component -Original Message- From: Andrew Maxwell [mailto:andrew.maxw...@papercut.com] Sent: Tuesday, May 22, 2012 9:28 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] non-vital files in an installation thanks Jacob, that's got me thinking. So, right now I have: !-- check if the custom logo exists or not -- Property Id=LOGOEXISTS DirectorySearch Id=CheckFileDir Path=[SourceDir] Depth=0 FileSearch Id=CheckFile Name=custom-logo.png/ /DirectorySearch /Property !-- declare components -- DirectoryRef Id=APPLICATIONROOTDIRECTORY Component Id=CustomLogo Guid=A5FF53DE-4321-42c4-BE39-60F810C9CD69 Condition ![CDATA[LOGOEXISTS]] /Condition File Id= customLogoFile Name=custom-logo.png Source=custom-logo.png Vital=no / CopyFile Id=customLogoFileCopy SourceName=customLogoFile DestinationDirectory=APPLICATIONROOTDIRECTORY / /Component !-- and then include this component in features as normal -- Feature Id=blah Title=blahblah# Level=1 ComponentGroupRef Id=main application/ ComponentRef Id=ApplicationShortcut / ComponentRef Id=CustomLogo / /Feature This gives the error: custom logo not found, and won't compile. Is it required that the file exists at compile time? If so this gets very tricky to automate... :\ (duplicate entries with heat-harvested custom-logo.png and manual condition reference above. cheers, Andrew On 22 May 2012 23:49, Hoover, Jacob jacob.hoo...@greenheck.com wrote: One option would be to create a custom action that would create temporary records on install if the file exists on the installation media. This would allow you to avoid the prompt, but it would mean you would need to handle all the scenarios (install, upgrade, remove, repair, etc) with temporary records. This would lend itself well if you don't know the content that might be included up front but is the more complex option. Since it seems you do know the files at build time, you could create a component with a condition that would evaluate a custom property to determine if it needs to be installed. Then in your installer you would have a custom action which would enable the component (via a property) if the file exist in the installation media. -Original Message- From: Andrew Maxwell [mailto:andrew.maxw...@papercut.com] Sent: Tuesday, May 22, 2012 2:20 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] non-vital files in an installation Hrm, alright - suppressing the GUI prompt itself is out of the question, then. Can anyone give any advice on what the best way to do this would be? - optional file might be placed in the distribution directory (eg. a logo file), with a specific name and location - at MSI runtime if the file exists, the MSI will copy it to the destination - if not, continues on without bothering the user My approach at the moment is to simply create a dummy file in my source directory when harvesting with heat, and setting its Vital flag to false. This works fine, apart from the GUI popup. cheers, Andrew On 22 May 2012 14:58, Rob Mensching r...@robmensching.com wrote: Never seen anything in the MSI SDK that suggests you can suppress that UI if you show the internal UI. You could develop your own external UI (but that's a lot of work). Burn could maybe make it a bit easier to develop the external UI. On Mon, May 21, 2012 at 7:42 PM, Andrew Maxwell andrew.maxw...@papercut.com wrote: Hi all
Re: [WiX-users] non-vital files in an installation
Excellent, thanks for your help all. Got it done :) cheers, Andrew On 23 May 2012 23:36, Hoover, Jacob jacob.hoo...@greenheck.com wrote: Yes, the file would have to exist at compile time if you are going to use a File element. On the media tag for the file, ensure it isn't in an embedded CAB. I believe a Media Tag with no Cabinet attribute would result in the file being expected to be located alongside the source. Since this is an image file, the only thing I can think of that you may have to do at runtime is update the file hash in a custom action. An alternate (and probably easier) option would be to eliminate the File element and then in the CopyFile refer to the file by name. This would mean you would have to add another element in the component to be the key path, such as a registry value. Component Id=CustomLogo Guid=A5FF53DE-4321-42c4-BE39-60F810C9CD69 Condition ![CDATA[LOGOEXISTS]] /Condition RegistryKey Root=HKLM Key=Software\Mfg\AppName Action=createAndRemoveOnUninstall RegistryValue Name=CustomLogo Value=1 Type=integer KeyPath=yes/ /RegistryKey CopyFile Id=customLogoFileCopy SourceDirectory=[SourceDir] SourceName=custom-logo.png DestinationDirectory=APPLICATIONROOTDIRECTORY/ RemoveFile Id=customLogoFileRemove Name=custom-logo.png On=uninstall / /Component -Original Message- From: Andrew Maxwell [mailto:andrew.maxw...@papercut.com] Sent: Tuesday, May 22, 2012 9:28 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] non-vital files in an installation thanks Jacob, that's got me thinking. So, right now I have: !-- check if the custom logo exists or not -- Property Id=LOGOEXISTS DirectorySearch Id=CheckFileDir Path=[SourceDir] Depth=0 FileSearch Id=CheckFile Name=custom-logo.png/ /DirectorySearch /Property !-- declare components -- DirectoryRef Id=APPLICATIONROOTDIRECTORY Component Id=CustomLogo Guid=A5FF53DE-4321-42c4-BE39-60F810C9CD69 Condition ![CDATA[LOGOEXISTS]] /Condition File Id= customLogoFile Name=custom-logo.png Source=custom-logo.png Vital=no / CopyFile Id=customLogoFileCopy SourceName=customLogoFile DestinationDirectory=APPLICATIONROOTDIRECTORY / /Component !-- and then include this component in features as normal -- Feature Id=blah Title=blahblah# Level=1 ComponentGroupRef Id=main application/ ComponentRef Id=ApplicationShortcut / ComponentRef Id=CustomLogo / /Feature This gives the error: custom logo not found, and won't compile. Is it required that the file exists at compile time? If so this gets very tricky to automate... :\ (duplicate entries with heat-harvested custom-logo.png and manual condition reference above. cheers, Andrew On 22 May 2012 23:49, Hoover, Jacob jacob.hoo...@greenheck.com wrote: One option would be to create a custom action that would create temporary records on install if the file exists on the installation media. This would allow you to avoid the prompt, but it would mean you would need to handle all the scenarios (install, upgrade, remove, repair, etc) with temporary records. This would lend itself well if you don't know the content that might be included up front but is the more complex option. Since it seems you do know the files at build time, you could create a component with a condition that would evaluate a custom property to determine if it needs to be installed. Then in your installer you would have a custom action which would enable the component (via a property) if the file exist in the installation media. -Original Message- From: Andrew Maxwell [mailto:andrew.maxw...@papercut.com] Sent: Tuesday, May 22, 2012 2:20 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] non-vital files in an installation Hrm, alright - suppressing the GUI prompt itself is out of the question, then. Can anyone give any advice on what the best way to do this would be? - optional file might be placed in the distribution directory (eg. a logo file), with a specific name and location - at MSI runtime if the file exists, the MSI will copy it to the destination - if not, continues on without bothering the user My approach at the moment is to simply create a dummy file in my source directory when harvesting with heat, and setting its Vital flag to false. This works fine, apart from the GUI popup. cheers, Andrew On 22 May 2012 14:58, Rob Mensching r...@robmensching.com wrote: Never seen anything in the MSI SDK that suggests you can suppress that UI if you show the internal UI. You could develop your own
Re: [WiX-users] non-vital files in an installation
Hrm, alright - suppressing the GUI prompt itself is out of the question, then. Can anyone give any advice on what the best way to do this would be? - optional file might be placed in the distribution directory (eg. a logo file), with a specific name and location - at MSI runtime if the file exists, the MSI will copy it to the destination - if not, continues on without bothering the user My approach at the moment is to simply create a dummy file in my source directory when harvesting with heat, and setting its Vital flag to false. This works fine, apart from the GUI popup. cheers, Andrew On 22 May 2012 14:58, Rob Mensching r...@robmensching.com wrote: Never seen anything in the MSI SDK that suggests you can suppress that UI if you show the internal UI. You could develop your own external UI (but that's a lot of work). Burn could maybe make it a bit easier to develop the external UI. On Mon, May 21, 2012 at 7:42 PM, Andrew Maxwell andrew.maxw...@papercut.com wrote: Hi all, I've got a scenario where in some cases a file may be included in our distribution, but if it's not - no big deal, the installation should continue on anyway. At the moment I've got the file flagged as Vital=no , and this achieves my goal - except for a popup asking to retry/cancel/ignore. Is there a way to suppress this dialogue and automatically select 'Ignore' ? Or is there a better way of achieving this? thanks for any input! Andrew -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- virtually, Rob Mensching - http://RobMensching.com LLC -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] non-vital files in an installation
One option would be to create a custom action that would create temporary records on install if the file exists on the installation media. This would allow you to avoid the prompt, but it would mean you would need to handle all the scenarios (install, upgrade, remove, repair, etc) with temporary records. This would lend itself well if you don't know the content that might be included up front but is the more complex option. Since it seems you do know the files at build time, you could create a component with a condition that would evaluate a custom property to determine if it needs to be installed. Then in your installer you would have a custom action which would enable the component (via a property) if the file exist in the installation media. -Original Message- From: Andrew Maxwell [mailto:andrew.maxw...@papercut.com] Sent: Tuesday, May 22, 2012 2:20 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] non-vital files in an installation Hrm, alright - suppressing the GUI prompt itself is out of the question, then. Can anyone give any advice on what the best way to do this would be? - optional file might be placed in the distribution directory (eg. a logo file), with a specific name and location - at MSI runtime if the file exists, the MSI will copy it to the destination - if not, continues on without bothering the user My approach at the moment is to simply create a dummy file in my source directory when harvesting with heat, and setting its Vital flag to false. This works fine, apart from the GUI popup. cheers, Andrew On 22 May 2012 14:58, Rob Mensching r...@robmensching.com wrote: Never seen anything in the MSI SDK that suggests you can suppress that UI if you show the internal UI. You could develop your own external UI (but that's a lot of work). Burn could maybe make it a bit easier to develop the external UI. On Mon, May 21, 2012 at 7:42 PM, Andrew Maxwell andrew.maxw...@papercut.com wrote: Hi all, I've got a scenario where in some cases a file may be included in our distribution, but if it's not - no big deal, the installation should continue on anyway. At the moment I've got the file flagged as Vital=no , and this achieves my goal - except for a popup asking to retry/cancel/ignore. Is there a way to suppress this dialogue and automatically select 'Ignore' ? Or is there a better way of achieving this? thanks for any input! Andrew -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- virtually, Rob Mensching - http://RobMensching.com LLC -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] non-vital files in an installation
thanks Jacob, that's got me thinking. So, right now I have: !-- check if the custom logo exists or not -- Property Id=LOGOEXISTS DirectorySearch Id=CheckFileDir Path=[SourceDir] Depth=0 FileSearch Id=CheckFile Name=custom-logo.png/ /DirectorySearch /Property !-- declare components -- DirectoryRef Id=APPLICATIONROOTDIRECTORY Component Id=CustomLogo Guid=A5FF53DE-4321-42c4-BE39-60F810C9CD69 Condition ![CDATA[LOGOEXISTS]] /Condition File Id= customLogoFile Name=custom-logo.png Source=custom-logo.png Vital=no / CopyFile Id=customLogoFileCopy SourceName=customLogoFile DestinationDirectory=APPLICATIONROOTDIRECTORY / /Component !-- and then include this component in features as normal -- Feature Id=blah Title=blahblah# Level=1 ComponentGroupRef Id=main application/ ComponentRef Id=ApplicationShortcut / ComponentRef Id=CustomLogo / /Feature This gives the error: custom logo not found, and won't compile. Is it required that the file exists at compile time? If so this gets very tricky to automate... :\ (duplicate entries with heat-harvested custom-logo.png and manual condition reference above. cheers, Andrew On 22 May 2012 23:49, Hoover, Jacob jacob.hoo...@greenheck.com wrote: One option would be to create a custom action that would create temporary records on install if the file exists on the installation media. This would allow you to avoid the prompt, but it would mean you would need to handle all the scenarios (install, upgrade, remove, repair, etc) with temporary records. This would lend itself well if you don't know the content that might be included up front but is the more complex option. Since it seems you do know the files at build time, you could create a component with a condition that would evaluate a custom property to determine if it needs to be installed. Then in your installer you would have a custom action which would enable the component (via a property) if the file exist in the installation media. -Original Message- From: Andrew Maxwell [mailto:andrew.maxw...@papercut.com] Sent: Tuesday, May 22, 2012 2:20 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] non-vital files in an installation Hrm, alright - suppressing the GUI prompt itself is out of the question, then. Can anyone give any advice on what the best way to do this would be? - optional file might be placed in the distribution directory (eg. a logo file), with a specific name and location - at MSI runtime if the file exists, the MSI will copy it to the destination - if not, continues on without bothering the user My approach at the moment is to simply create a dummy file in my source directory when harvesting with heat, and setting its Vital flag to false. This works fine, apart from the GUI popup. cheers, Andrew On 22 May 2012 14:58, Rob Mensching r...@robmensching.com wrote: Never seen anything in the MSI SDK that suggests you can suppress that UI if you show the internal UI. You could develop your own external UI (but that's a lot of work). Burn could maybe make it a bit easier to develop the external UI. On Mon, May 21, 2012 at 7:42 PM, Andrew Maxwell andrew.maxw...@papercut.com wrote: Hi all, I've got a scenario where in some cases a file may be included in our distribution, but if it's not - no big deal, the installation should continue on anyway. At the moment I've got the file flagged as Vital=no , and this achieves my goal - except for a popup asking to retry/cancel/ignore. Is there a way to suppress this dialogue and automatically select 'Ignore' ? Or is there a better way of achieving this? thanks for any input! Andrew -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- virtually, Rob Mensching - http://RobMensching.com LLC -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114
[WiX-users] non-vital files in an installation
Hi all, I've got a scenario where in some cases a file may be included in our distribution, but if it's not - no big deal, the installation should continue on anyway. At the moment I've got the file flagged as Vital=no , and this achieves my goal - except for a popup asking to retry/cancel/ignore. Is there a way to suppress this dialogue and automatically select 'Ignore' ? Or is there a better way of achieving this? thanks for any input! Andrew -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] non-vital files in an installation
Never seen anything in the MSI SDK that suggests you can suppress that UI if you show the internal UI. You could develop your own external UI (but that's a lot of work). Burn could maybe make it a bit easier to develop the external UI. On Mon, May 21, 2012 at 7:42 PM, Andrew Maxwell andrew.maxw...@papercut.com wrote: Hi all, I've got a scenario where in some cases a file may be included in our distribution, but if it's not - no big deal, the installation should continue on anyway. At the moment I've got the file flagged as Vital=no , and this achieves my goal - except for a popup asking to retry/cancel/ignore. Is there a way to suppress this dialogue and automatically select 'Ignore' ? Or is there a better way of achieving this? thanks for any input! Andrew -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- virtually, Rob Mensching - http://RobMensching.com LLC -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users