Thank you for the information. I am new and in my shop, I have to be a jack-of-all trades, but master of none. I would like to learn more on how to create installers, upgrades and patches. Where is a good place to learn all of the terminology and the different options?
Thank you, Brian Wilson Department of Human Resources - Administrative Services Email: brian.wil...@dhr.alabama.gov -----Original Message----- From: Castro, Edwin G. (Hillsboro) [mailto:edwin.cas...@fiserv.com] Sent: Tuesday, January 18, 2011 6:29 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Modify Heat Generated Fragment with C# Here is a XSLT that should add the Shortcut element: <?xml version="1.0" encoding="utf-8"?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> <xsl:output method="xml" indent="yes" version="1.0" encoding="utf-8" /> <!-- generic copy template--> <xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:template> <!-- override template for TestImportApp.exe File --> <xsl:template match="wix:File[@Source='!(wix.ImportSrc)\TestImportApp.exe']"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> <xsl:element name="Shortcut" namespace="http://schemas.microsoft.com/wix/2006/wi"> <xsl:attribute name="Id">startmenuImport</xsl:attribute> <xsl:attribute name="Directory">Test Import App</xsl:attribute> <xsl:attribute name="Name">Test1B</xsl:attribute> <xsl:attribute name="WorkingDirectory">INSTALLLOCATION</xsl:attribute> <xsl:attribute name="Icon">TestImportApp.exe</xsl:attribute> <xsl:attribute name="IconIndex">0</xsl:attribute> <xsl:attribute name="Advertise">yes</xsl:attribute> </xsl:element> </xsl:copy> </xsl:template> </xsl:transform> Edwin G. Castro Software Developer - Staff Electronic Banking Services Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com Please consider the environment before printing this e-mail > -----Original Message----- > From: Castro, Edwin G. (Hillsboro) [mailto:edwin.cas...@fiserv.com] > Sent: Tuesday, January 18, 2011 3:20 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Modify Heat Generated Fragment with C# > > You are matching the entire document and processing only a subset of the > data. The result of that match will replace the entire document with your > processing results. The reason the processing results are NULL is that you are > not properly addressing nodes using the necessary namespaces. > > You should organize your xslt with a "copy" template that knows how to copy > generic nodes and attributes properly. Once you can apply the transform to > the generated .wxs and have the result be the original .wxs file then you can > create a few templates to specifically address the changes you want to make. > > Let me know if you are still interested in pursuing the XSLT solution and > could > iterate over the problem offline. > > Edwin G. Castro > Software Developer - Staff > Electronic Banking Services > Fiserv > Office: 503-746-0643 > Fax: 503-617-0291 > www.fiserv.com > P Please consider the environment before printing this e-mail > > > -----Original Message----- > > From: Wilson, Brian [mailto:brian.wil...@dhr.alabama.gov] > > Sent: Tuesday, January 18, 2011 2:50 PM > > To: General discussion for Windows Installer XML toolset. > > Subject: Re: [WiX-users] Modify Heat Generated Fragment with C# > > > > I was looking at this option, but I am not sure what is going on. > > > > I created the following XSL file: > > <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet > version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> > > <xsl:template match="/"> > > <xsl:for-each > > > select="Wix/Fragment/DirectoryRef/Component/File[Source='!(wix.ImportS > > rc)\TestImportApp.exe']"> > > <xsl:element name="Shortcut" use-attribute- > sets="shortcut-set" /> > > </xsl:for-each> > > </xsl:template> > > > > <xsl:attribute-set name="shortcut-set"> > > <xsl:attribute name="Id">startmenuImport</xsl:attribute> > > <xsl:attribute name="Directory">Test Import > App</xsl:attribute> > > <xsl:attribute name="Name">Test1B</xsl:attribute> > > <xsl:attribute > > name="WorkingDirectory">INSTALLLOCATION</xsl:attribute> > > <xsl:attribute name="Icon"> > > TestImportApp.exe</xsl:attribute> > > <xsl:attribute name="IconIndex">0</xsl:attribute> > > <xsl:attribute name="Advertise">yes</xsl:attribute> > > </xsl:attribute-set> > > </xsl:stylesheet> > > > > And changed my heat call to: > > heat dir "C:\Projects\TestImportApp" -dr INSTALLLOCATION -v -gg -g1 > > -var wix.ImportSrc -srd -sfrag -scom -cg cgImport -t "C:\Projects\WiX > > Test Files\test.xsl" -out "C:\Projects\WiX Test Files\wix_import_2.wxs" > > > > The command runs without an error, but nothing is ever generated. If > > I remove the -t switch and value, the WXS is generated properly. > > > > Thank you, > > > > Brian Wilson > > Department of Human Resources - Administrative Services > > Email: brian.wil...@dhr.alabama.gov > > > > > > > > -----Original Message----- > > From: Maillet, Ed [mailto:email...@unum.com] > > Sent: Tuesday, January 18, 2011 2:42 PM > > To: General discussion for Windows Installer XML toolset. > > Subject: Re: [WiX-users] Modify Heat Generated Fragment with C# > > > > Have you tried doing it with an xslt instead? > > See the "-t" option. > > > > > > -----Original Message----- > > From: Wilson, Brian [mailto:brian.wil...@dhr.alabama.gov] > > Sent: Tuesday, January 18, 2011 3:29 PM > > To: 'WiX-users@lists.sourceforge.net' > > Subject: [WiX-users] Modify Heat Generated Fragment with C# > > > > Hello, > > > > I have a Heat generated WXS file that I am trying to modify, so I can > > add the shortcut node to the file node for my application. I am > > trying to use a C# program to do this for me. > > > > I am using the following code: > > > > XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"C:\Wix > > Files\wix_import.wxs"); > > > > XmlNode xmlWiX = xmlDoc.DocumentElement; > > > > XmlNode xmlrplc = > > > xmlWiX.SelectSingleNode(@"File[@Source='!(wix.ImportSrc)\TestImportAp > > p.exe']"); > > XmlNode xmlparent = xmlrplc.ParentNode; ** Errors here*** > > xmlparent.RemoveChild(xmlrplc); > > > > xmlsrc.Save(@"~\modded_wix_import.wxs"); > > > > The attribute is not found, so I thought I would just find the node, so I > tried: > > XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"C:\Wix > > Files\wix_import.wxs"); > > > > XmlNode xmlWiX = xmlDoc.DocumentElement; XmlNode xmlrplc = null; > > > > XmlNode xmlComp = xmlWiX.SelectNodes("/Component"); XmlNodeList > > xmlList = xmlComp.ChildNodes; ** Errors here*** > > > > foreach (XmlNode xmlChild in xmlList) > > { > > if (xmlChild.Name == "File") > > { > > if (xmlChild.Attributes["Source"].Value == > > "!(wix.ImportSrc)\TestImportApp.exe") > > { > > xmlrplc = xmlChild; > > } > > } > > } > > > > XmlNode xmlparent = xmlrplc.ParentNode > > xmlparent.RemoveChild(xmlrplc) > > > > xmlsrc.Save(@"~\modded_wix_import.wxs") > > > > It seems the XML library is having a difficult time traversing the XML > > document. Has anyone done something like this and if so, what am I > > doing wrong? > > > > > > Thank you, > > > > Brian Wilson > > Department of Human Resources - Administrative Services > > Email: brian.wil...@dhr.alabama.gov > > > > > > > > ---------------------------------------------------------------------- > > -------- Protect Your Site and Customers from Malware Attacks Learn > > about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how > > you can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ---------------------------------------------------------------------- > > -------- Protect Your Site and Customers from Malware Attacks Learn > > about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how > > you can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ---------------------------------------------------------------------- > > -------- Protect Your Site and Customers from Malware Attacks Learn > > about various malware tactics and how to avoid them. Understand > > malware threats, the impact they can have on your business, and how > > you can protect your company and customers by using code signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks Learn about various > malware tactics and how to avoid them. Understand malware threats, the > impact they can have on your business, and how you can protect your > company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users