tag:blogger.com,1999:blog-17939852158104624532024-03-12T19:58:06.670-07:00MSI - Microsoft Installer or Windows InstallerFaqsIRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-1793985215810462453.post-28473357769471597542008-11-17T01:27:00.003-08:002008-12-23T20:40:49.225-08:00MSI DLL Custom Actions<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>JA</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> <w:usefelayout/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-family: "Verdana","sans-serif"; color: rgb(14, 64, 99);">
<br /><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">In an MSI DLL custom action written with C or C++, the process of writing to the log file is<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">similar to the VBScript code, except that you use MsiCreateRecord to create the message<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">record and MsiProcessMessage to pass the record to the running installer.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">You begin by creating a C or C++ DLL project in Visual Studio, for example. The C++ code<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">for this example might look like the following.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">#pragma comment(lib, "msi.lib")<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">#include<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">#include<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">#include<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// standard MSI DLL custom action signature<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">UINT __stdcall LoggingTestCpp(MSIHANDLE hInstall)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">PMSIHANDLE hRecord = MsiCreateRecord(1);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// field 0 is the template<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">MsiRecordSetString(hRecord, 0, "Log: [1]");<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// field 1, to be placed in [1] placeholder<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">MsiRecordSetString(hRecord, 1, "Calling LoggingTestCpp...");<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// send message to running installer<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">MsiProcessMessage(hInstall, INSTALLMESSAGE_INFO, hRecord);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">return ERROR_SUCCESS;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">To ensure that the function name is properly exported from the DLL, you can create a .def<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">file with contents similar to the following:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">LIBRARY "LoggingTestCpp" ; <i>DLL name<o:p></o:p></i></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">EXPORTS ; <i>exported function names<o:p></o:p></i></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">LoggingTestCpp<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The DLL project in Visual Studio might look similar to the following.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">After building the DLL, in InstallShield you can create an MSI DLL custom action, for this<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">example calling it <i>callLoggingTestCpp</i>, and again scheduling it for immediate execution after<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">LaunchConditions.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">After rebuilding the project and running the MSI with the logging switch, lines similar to the<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">following should appear in the log file.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action 25:00:00: callLoggingTestCpp.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action start 25:00:00: callLoggingTestCpp.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">[...lines omitted...]<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Log: Calling LoggingTestCpp...<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action ended 25:00:00: callLoggingTestCpp. Return value 1.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">For more information, see the MSI help library topic "Windows Installer Logging".<o:p></o:p></span></p> IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-52214085036139331282008-11-17T01:27:00.001-08:002008-12-23T20:40:49.225-08:00VBScript Custom Actions<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>JA</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> <w:usefelayout/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-family: "Verdana","sans-serif"; color: rgb(14, 64, 99);">
<br /><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">With VBScript actions (as well as with MSI DLL actions, described in the following section),<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">the general process is to assemble a <i>record </i>containing the message information, and then<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">send the record to the running installation. With VBScript, you use Installer.CreateRecord to<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">create the message record, and use Session.Message to send the record to the running<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">installation.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The record begins with a "template" in field 0, which is a string containing placeholders of<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">the form [1], [2], and so forth. These placeholders will then be filled in with the values in<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">record fields 1, 2, and so on.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">To demonstrate a VBScript action writing to the log, you can create an immediate-mode<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">VBScript custom action called <i>callLoggingTestVBS</i>, scheduled immediately after<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">LaunchConditions, with the following code.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">(For this example, you can store the code directly in the custom action since the script is<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">short. In practice, using an external .vbs file is generally recommended so you can specify a<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">function return value and optionally exit the installer from the custom action.)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Const msiMessageTypeInfo = &H04000000<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">' create the message record<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Set msgrec = Installer.CreateRecord(1)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">' field 0 is the template<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">msgrec.StringData(0) = "Log: [1]"<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">' field 1, to be placed in [1] placeholder<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">msgrec.StringData(1) = "Calling LoggingTestVBS..."<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">' send message to running installer<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Session.Message msiMessageTypeInfo, msgrec<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The action might appear similar to the following figure.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">After building the project and creating a log file, the following lines should appear in the log:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action 25:00:00: callLoggingTestVBS.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action start 25:00:00: callLoggingTestVBS.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">[...lines omitted...]<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Log: Calling LoggingTestVBS...<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action ended 25:00:00: callLoggingTestVBS. Return value 0.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">A possible refinement is to modify the template field (field 0) of the record to include a<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">timestamp or information about whether the action is being called from immediate<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">execution or deferred execution. Studying the log messages displayed by standard actions<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">can provide a useful model.<o:p></o:p></span></p> IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-64158193003571984442008-11-17T01:26:00.000-08:002008-12-23T20:40:49.225-08:00InstallScript Custom Actions<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>JA</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> <w:usefelayout/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-family: "Verdana","sans-serif"; color: rgb(14, 64, 99);">
<br /><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">In an InstallScript custom action, you can call <i>SprintfMsiLog </i>to write a string to the MSI log<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">file. For example, the following InstallScript code prototypes and defines an InstallScript<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">custom action called <i>LoggingTestInstallScript</i>.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">#include "ifx.h"<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// standard custom action prototype<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">export prototype LoggingTestInstallScript(HWND);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// custom action definition<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">function LoggingTestInstallScript(hInstall)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">begin<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">SprintfMsiLog("Calling LoggingTestInstallScript...");<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><i><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">// return success to MSI<o:p></o:p></span></i></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">return ERROR_SUCCESS;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">end;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">In order to be called, the custom action must be scheduled in the sequences. For this<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">example, open the Custom Actions view and create an immediate-mode InstallScript custom<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">action called <i>callLoggingTest </i>that calls the <i>LoggingTestInstallScript </i>function, and schedule it<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">to run after LaunchConditions.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">After building the package and running it with the /L*v switch, you should see a line similar<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">to the following in the log file:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">InstallShield 25:00:00: Invoking script function LoggingTestInstallScript<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">1: Calling LoggingTestInstallScript...<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">InstallShield 25:00:00: CallScriptFunctionFromMsiCA() ends<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Action ended 25:00:00: callLoggingTest. Return value 1.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The SprintfMsiLog function is similar to the Sprintf and SprintfBox functions, in that you can<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">include placeholders ("%s" or "%d" fields, called "format specifiers") in the message string<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">if you want to splice in the values of string or numeric variables.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-family: "Verdana","sans-serif"; color: rgb(14, 64, 99);"><o:p> </o:p></span></b></p> IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-32315423968249831502008-11-17T01:13:00.000-08:002008-12-23T20:40:49.226-08:00MSI Log File Basics<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>JA</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> <w:usefelayout/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:Wingdings-Regular; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:3 0 0 0 1 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-family: "Verdana","sans-serif"; color: rgb(14, 64, 99);"><o:p> </o:p>
<br /><o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">An MSI log file is a text file that provides a great deal of information about an installation<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">program during a given run on a particular system, including:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 7pt; font-family: "Arial","sans-serif"; color: black;">��</span><span style="font-size: 7pt; font-family: Wingdings-Regular; color: black;"> </span><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Final property values<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 7pt; font-family: "Arial","sans-serif"; color: black;">��</span><span style="font-size: 7pt; font-family: Wingdings-Regular; color: black;"> </span><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Startup information for actions<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 7pt; font-family: "Arial","sans-serif"; color: black;">��</span><span style="font-size: 7pt; font-family: Wingdings-Regular; color: black;"> </span><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Status, warning, and error messages<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">There are several ways to create an MSI log file, including:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">1. Use the /L switch to msiexec.exe, as in this command:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">msiexec /i product.msi /L*v everything.log<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The characters "*v" after the /L switch indicate to perform verbose logging of every<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">action taken by Windows Installer. The MSI help library describes the other switches<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">you can use to limit the information contained in a log file.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">If your release settings include creation of a setup.exe launcher, you can use the <b>MSI<o:p></o:p></b></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Command Line Arguments </span></b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">setting in the release properties to pass in the /L switch<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">to msiexec.exe, with a value such as this:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">/L*v "%TEMP%\everything.log"<o:p></o:p></span></b></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">Note that you cannot use MSI properties in the log-file path, as properties will not be<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">available until after the installation has initialized. The command above relies on the<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">command processor expanding the %TEMP% environment variable.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">2. With MSI 4.0 on Windows Vista, you can set the MsiLogging property to a string<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">containing the logging flags you want to use. With InstallShield 2008, you can set this<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">using the <b>Create MSI Logs </b>setting in the Product Properties view. The path to the log<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">file will be stored in the MsiLogFileLocation property. (Note that you can read this<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">property but not set it.) Using this switch in the InstallShield environment also<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 8pt; font-family: "Arial","sans-serif"; color: black;"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">displays the Show the Windows Installer Log check box in the SetupCompleteSuccess<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">dialog box.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The MSI help library describes other options, such as setting the Logging policy in the<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">registry, which creates a randomly-named log file in the Temp directory for every MSI<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">installation.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">The MSI Log File Analyzer, available under InstallShield's <b>Tools </b>menu, can generate an MSI<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">log file and create various color-coded HTML reports based on a log file.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">By default, an MSI log file contains a return value for each built-in and custom action. The<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">following sections describe how to write more detailed information into the log file. Note<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">that these techniques do not create an MSI log file or initiate logging, but instead write to a<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: black;">log file created by the /L switch, the MsiLogging property, or the like.<o:p></o:p></span></p> IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-8026597310750690292008-11-17T00:53:00.002-08:002008-12-23T20:40:49.226-08:00Command-Line Switches for the Windows Installer Tool <meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>JA</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:.7in .5in .5in .7in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoNormal" style="margin: 3pt 12pt 2.5pt 9pt;"><span style="font-size: 16pt;">
<br /></span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">The Windows Installer executable program that interprets packages and installs</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">products is Msiexec.exe. This article lists the command-line switches for this</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">program. You cannot run the Msiexec.exe program without specifying at least one</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">switch.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">Switch<span style=""> </span>Parameters<span style=""> </span>Description</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">--------------------------------------------------------------------------</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/i<span style=""> </span>Package|ProductCode<span style=""> </span>Installs or configures a</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>product.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/f<span style=""> </span>[p|o|e|d|c|a|u|m|s|v]Package|ProductCode<span style=""> </span>Repairs a product. </span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>p - Reinstalls a</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>product only if a </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>file is missing.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>o - Reinstalls a</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>product if a file</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>is missing or if an </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>older version of a file</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>is installed.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>e - Reinstalls a</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>product if a file</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>is missing or an equal </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>or older version of a </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>file is installed.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>d - Reinstalls a</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>product if a file</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>is missing or a </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>different</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>version of a file is</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>installed.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>c - Reinstalls a</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>product if a file </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>is missing or the stored </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>checksum value does not</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>match the calculated</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>value.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>a - Forces all files to</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>be reinstalled.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>u - Rewrites all</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>required user-</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>specific registry </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>entries.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>m - Rewrites all </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>required</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>computer-specific </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>registry entries.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>s - Overwrites all </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>existing shortcuts.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>v - Runs from the source</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>file and re-caches the</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>local package.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/a<span style=""> </span>Package<span style=""> </span><span style=""> </span>Administrative</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>installation option.</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>Installs a product on </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>the network.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/x<span style=""> </span>Package|ProductCode<span style=""> </span>Uninstalls a product.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/j<span style=""> </span>[u|m]Package<span style=""> </span>Advertises a product.</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>or [u|m]Package /t Transform List<span style=""> </span>The property values used</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>or[u|m]Package /g LanguageID<span style=""> </span><span style=""> </span>on the command line are</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>ignored.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>u - Advertises a product</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>to the current user.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>m - Advertises a product</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>to all users. </span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>g - Language ID.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>t - Applies a transform</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>list to an advertised</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>package.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/l<span style=""> </span>[i|w|e|a|r|u|c|m|p|v|+|!]Logfile<span style=""> </span>Specifies the log </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>file path and</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>indicates the flags </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>to be logged.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>i - Status messages.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>w - Non-fatal warnings.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>e - All error messages.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>a - Startup of actions.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>r - Action-specific</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>records</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>u - User requests.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>c - Initial User</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>Interface (UI) </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>parameters</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>m - Out-of-memory.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>p - Terminal properties.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>v - Verbose output.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>+ - Appends to the</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>existing file.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>! - Clears each line in</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>the log file.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>"*" - Wildcard.</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>Logs all information,</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>but the use of the v</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>option is not included.</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>To include the v option,</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>type "/l*v."</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/p<span style=""> </span>Patch/Package<span style=""> </span><span style=""> </span>Applies a patch. To </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>apply a patch to an </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>installed Administrator</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>image, type the </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>following options:</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>/p [PatchPackage]</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>/a [Package]</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/q<span style=""> </span>n|b|r|f<span style=""> </span>Sets the UI level.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>q , qn - No UI.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>qb - Basic UI.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>qr - Reduced UI. A modal</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>dialog box is displayed</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>at the end of the</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>installation.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>qf - Full UI. A modal</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>dialog box is displayed</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>at the end of the</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>installation.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>qn+ - No UI. However, a </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>modal dialog box is</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>displayed at the end of</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>the installation.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>qb+ - Basic UI. A modal</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>dialog box is displayed</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>at the end of the </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>installation. If you </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>cancel the installation, </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>a modal dialog box is </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>not displayed.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>qb- - Basic UI with no</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>modal dialog boxes. </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>The "/qb+-" switch</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>is not a supported UI </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>level.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/y<span style=""> </span>module<span style=""> </span>Calls the system</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>Application Programming</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>Interface (API) </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>DllRegisterServer, which</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>registers modules that</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>are typed on the </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>command line (for</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>example, "msiexec /y</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>my_file.dll").</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>This option is only used </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>for registry information</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>that cannot be added </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>using the registry </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>tables of the .msi file.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">/z<span style=""> </span>module<span style=""> </span>Calls the system API </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>DllUnRegisterServer,</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>to unregister modules </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>that are typed on the</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>command line (for </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>example, "msiexec /z </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>my_file.dll").</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>This option is only used </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>for registry information </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>that cannot be removed </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>using the registry </span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>tables of the .msi file.</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">For more information and examples, please see the topic "Command Line Options" in</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";">Windows Installer Help or the following Web site:</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>http://msdn.microsoft.com/library/psdk/msi/app_73eb.htm</span></p> <p class="MsoNormal" style="margin: 0in 12pt 0.0001pt 13.5pt;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>(http://msdn.microsoft.com/library/psdk/msi/app_73eb.htm)</span></p> <p class="MsoNormal" style=""><span style="font-size: 5pt; font-family: "Courier New";"><span style=""> </span></span></p> <p class="MsoNormal" style="margin-left: 9pt;"><o:p> </o:p></p> <p class="MsoNormal" style=""><span style="font-family: "Arial","sans-serif";"><span style=""> </span></span></p> <p class="MsoNormal"><o:p> </o:p></p> IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-60132214890897541672008-11-17T00:53:00.001-08:002008-12-23T20:40:49.226-08:00Do you experience this kind of problem whenever you attemp to install an application in windows box "The Windows Installer service could not be accessThis can occur if you are running Windows in The ms website knowledge article 324516 gives 2 methods as a way of fixing this problem, but you might Well, the solution is very easy:<br />1. right click your root windows installation drive i.e drive where you installed windows<br />2. click properties at the bottom<br />3. select security tab<br />4. click Add and scroll down to SYSTEM account click add and click OK.<br />5. allow Full control permission and click Apply and then Ok.<br />This should solve your problem with windows installer.IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-51191255209179382502008-11-17T00:48:00.000-08:002008-12-23T20:40:49.226-08:00how to thoroughly test a packageBefore the advent of third-party testing tools, determining what to test and the best way to thoroughly test a package was a difficult task. Today’s IT staff is aided with this task by products that not only break down a package into logical test elements but also provide a means of triggering and tracking the testing of each element. Third-party testing tools offer testing options for the following package elements:<br /><br />• Package installation—Verification of the installation itself<br /><br />• Standard tests—Verification of network and database connectivity, network location, and program execution<br /><br />• Application verification—Verification of ClassIDs, file extensions, Help files, ProgIDs, and shortcuts<br /><br />• Application execution—Verification of execution and identification of run-time loaded and/or created files and registry entries<br /><br />• Uninstall tests—Verification that the uninstall removes residual files and registry entries The following scenarios provide an overview of the effectiveness of using a third-party testing tool. In these examples, Test Expert is used to illustrate the testing process.<br /><br />Package Installation Tests<br /><br />Package installation tests verify that the installation runs on your local computer without errors. To perform this test, click Install from the toolbar to initiate the installation. To run as a user with different privileges, click Install As instead.<br />When you are done, update the status of this test from Pending to Passed (or Failed).<br />If you run into a problem here, step back and examine the package contents in the Windows Installer Editor. You might also expose problems with your package using the Package Validation tool, which examines the makeup of the MSI database<br />for any problems or rules that are not being followed.<br />One tool that offers these testing capabilities is Wise Package Studio’s Test Expert. This tool starts by displaying test plan details in the form of pie charts and tables. The graphics show the current progress of the testing process as well as a view of test results (successes vs. failures).<br /><br />Standard Tests<br /><br />If your application (or its package) needs to access the Internet, a database, or a local network share, or needs to execute a file, you can use standard tests to address any concerns. For this set of tests, you will need to add any items manually.<br />Once an item has been added, it will appear within the check box list. You select the item by selecting its check box in the list, right-clicking the item, and clicking Execute. Once you complete this set up and run each test, the success or failure will be updated automatically upon each test’s execution.<br /><br />The only pre-populated test in this section is that of an Internet check (for the Wise home page). If your application does not need Internet connectivity, simply delete this test and proceed to the next section. Application Verification<br />Among all the tests offered, the application verification section of tests is most valuable. Tracking each of these items manually is a daunting task that is made quite simple through the use of a third-party tool. The following list highlights available application verification tests:<br /><br />• ClassIDs—This test checks whether COM objects declared by a ClassID can be created. This test might expose problems such as missing DLLs that are required by the ClassID to create the object. The ClassID test might be run automatically if the package being tested is currently installed.<br /><br />• File extensions—This test creates a list of verbs associated with each extension in the package and prompts you to select a file type for each one. It then attempts to execute each verb so that you can visually determine whether the verb performs as expected.<br />Windows Installer offers extensive logging options.<br /><br />You can specify what to log at a very granular level or you can log everything by specifying an asterisk (wildcard):<br /><br />msiexec /i MyPackage.msi /l* C:\Packages\MyPackage\MyPackage.log<br /><br />In addition to being able to specify logging options at the command line, you can also instruct your system to log the installation of all Windows Installer packages as a Windows Policy. To make this change directly in the registry, you simply<br />make the following change:<br /><br />Subkey: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer<br />Value: Logging (Type: REG_SZ)<br />Data: voicewarmup<br /><br />Voicewarmup is the long way to specify all values; each letter represents a different logging option.<br /><br />The log file can be a bit ugly to look at, but at times, it is the best place to find information beyond what is presented in any error dialog box you encounter. Microsoft provides a helpful viewer for these logs in the Windows Installer Software<br />Development Kit (SDK—Wilogutl.exe).<br />Some test cases might have to be run on multiple computers. For example, to test a launch condition that is specific to Windows XP, you must install not only on a computer running Windows XP but also on a non-Windows XP computer. To easily switch computers, while providing easy access to test case information, you can perform a Wise Package Studio client installation.<br />!<br />• Help files—If the package being tested is installed, this test verifies that application Help files can be opened by allowing you to execute any CHM or HLP files located in your package.<br /><br />• ODBC data sources—This test allows you to check whether an ODBC data source has been created correctly and whether the data source is accessible.<br /><br />• ProgIDs—Similar to the ClassID test, this test allows you to check whether COM objects declared by a ProgID can be created.<br /><br />• Search Locations—If search locations are detected in a package, this test verifies that the search locations exist and are accessible.<br /><br />• Services—This test verifies that any included services are installed and correctly registered with the Service Control Manager.<br /><br />• Shortcuts—This test verifies that shortcuts in the installation are attached to a valid target file and that the target opens when the shortcut is selected.<br /><br />Application Execution In addition to these tests, there are tests that allow you to execute your application and verify which files and registry entries<br />are accessed by your package. These tests all run simultaneously to monitor the testing computer as you exercise the features of the application. Test Expert will identify files and registry keys that are accessed by the application but not installed by the package—the use of third party tools is not required. For the item coverage tests, a tool will record which installed files are accessed during application execution so that you can identify files that might not be required by your package.<br /><br /><br />Uninstall Tests<br /><br />The uninstall tests also run simultaneously to determine how the uninstall sequence in the package is performing. It detects created, destroyed, and residual items pertaining to the removal of the package. Created items include all files and registry items created by the application when it was opened as well as any files that were created while testing. Destroyed items identify items that existed on the computer before installation but were missing after uninstall. Finally, residual items refer to those elements of your package that were installed but not removed by the removal of your package. For the most part, these tests will not identify any serious problems with your package but are helpful to determine whether your package will do a good job of cleaning up after itself.<br /><br />summary<br />The damage that can be done by a poor installation package to both your network and your package and deployment team’s reputation are difficult to measure. Thus, putting your package through thorough testing as part of your quality assurance (QA) process is an essential step in ensuring success and will provide you with confidence in the performance of your MSI setup.IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-4796604719573770242008-11-17T00:43:00.003-08:002008-12-23T20:40:49.226-08:00Using SpawnWaitDialog<h2><a name="spawn"><br /></a></h2> <p>A common request for installation programs is to display a small modal dialog box while a lengthy action is taking place (similar to SdShowMsg, for those familiar with InstallScript programming). The nearest built-in equivalent in MSI is a dialog box triggered with the SpawnWaitDialog control event, which displays a modal dialog box until a specified condition is true.</p> <p>For example, suppose you have a button reading “Perform lengthy action…” on one of your dialog boxes, and you want a dialog box similar to the following to be displayed while the action is taking place:</p> <p><img src="http://www.prairienet.org/%7Epops/spawneddialog.png" alt="Dialog to spawn" width="366" height="178" /></p> <p>You can create this dialog using the Dialog and Control tables, the main point being to make sure the dialog (called SpawnMe in the Dialog table) has the <em>modal</em> attribute (value 2) set.</p> <p>For this example, I’ve defined the lengthy action to be an asynchronous DLL action, with the following implementation.</p> <pre>#pragma comment(lib, "msi.lib")<br /><br />#include <windows.h><br />#include <msi.h><br />#include <msiquery.h><br /><br />UINT __stdcall LengthyAction(MSIHANDLE hInstall)<br />{<br /> Sleep(5000); // <-- put long-running code here<br /><br /> // set property that indicates the action is finished<br /> MsiSetProperty(hInstall, TEXT("DoneWithLengthyAction"), TEXT("X"));<br /> return ERROR_SUCCESS;<br />}</pre> <p>Naturally, the code that takes a long time will take the place of the Sleep function above. (Someone once asked me for a way to slow down an installation program, which is about the fifth-funniest installation-related question I’ve been asked.) As with all custom action DLLs, you’ll probably want to use a .def file or the like to suppress name decoration:</p> <pre>LIBRARY WaitThenSetProperty<br /><br />EXPORTS<br /> LengthyAction</pre> <p>A good place for this kind of helper DLL is in the Binary table. The action that calls the LengthyAction function from WaitThenSetProperty.dll has type 193, asynchronous DLL. Predictably, in the CustomAction table I’ve named the action CallLengthyAction.</p> <p>To tie everything together, your “Perform lengthy action…” button will have two control events: one to launch the action, one to spawn the wait dialog box while the action is running. The first one should be familiar: a DoAction control event with target CallLengthyAction and condition 1.</p> <p>The second control event is a SpawnWaitDialog control event, with argument SpawnMe (the name of the dialog to spawn) and condition DoneWithLengthyAction (a condition indicating when the dialog is no longer needed, using the property defined in the DLL action code).</p> <p>When running the project, the initial dialog box might look as follows:</p> <p><img src="http://www.prairienet.org/%7Epops/beforespawn.png" alt="Before and after spawned dialog" width="504" height="386" /></p> <p>When the user clicks the big button, and While the action is running (that is, while DoneWithLengthyAction is unset), the spawned dialog box appears over the normal dialog box as follows:</p> <p><img src="http://www.prairienet.org/%7Epops/duringspawn.png" alt="Spawned dialog" width="504" height="386" /></p> <p>Once the action has finished (that is, once the condition DoneWithLengthyAction is true; that is, once the action sets the DoneWithLengthyAction property to any value), the spawned dialog vanishes, and the dialog box appears as it did in the first figure.</p> <p>Closing remarks:</p> <ul><li>An obvious refinement is to disable the big button after the action has completed; otherwise, the button remains active, but the spawned dialog box will not appear again. (Easy pop quiz: Why not?)</li><li>As you know, actions in the UI sequence should not make system changes, but instead just query the target system. For actions in the Execute sequence, setting up ActionText and ActionData so that a description and ticks appear on the progress dialog is the recommended approach.</li></ul>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-63979065087764429532008-11-17T00:43:00.002-08:002008-12-23T20:40:49.226-08:00Investigating self-repair<h2><a name="selfrepair">Investigating self-repair</a></h2> <p>Another common question is, “Why does Windows Installer run every time I restart my system/start my application?”</p> <p>This behavior is part of the <em>resiliency</em> or <em>self-repair</em> feature of Windows Installer. (This question has been answered many times in many places, but not with pictures.) When MSI fails to find a resource it needs, it displays a configuration dialog box similar to the following:</p> <p><img src="http://www.prairienet.org/%7Epops/repairing.png" alt="MSI self-repair progress bar" width="386" height="154" /></p> <p>To see details about the missing resource, open the Event Viewer (Control Panel > Administrative Tools); the details are in the <strong>Application</strong> section.</p> <p><img src="http://www.prairienet.org/%7Epops/repaireventviewer.png" alt="Event Viewer" width="630" height="209" /></p> <p>The details of the repair are the <strong>MsiInstaller</strong> entries in the Application section of the event viewer.</p> <p><img src="http://www.prairienet.org/%7Epops/repaireventapplication.png" alt="events in Application section" width="630" height="196" /></p> <p>Double-clicking the warning event reveals the event properties; the details of the event list the product code, feature name, and component code involved, as well as the missing resource.</p> <p><img src="http://www.prairienet.org/%7Epops/repaireventdetails.png" alt="event details" width="404" height="357" /></p> <p>(A <a href="http://www.prairienet.org/%7Epops/msi_tips.html#inventory">previous tip</a> hinted at how to get more information about a product or component, given its GUID.)</p> <p>I’m not aware of a way to disable self-repair, short of disabling advertised shortcuts, extracted COM information, Extension-table file associations, etc.</p> <p>A follow-up question is how to log self-repair operations, since there’s not an explicit msiexec command to which you can add the /L switch. One uninviting method is to set the system-wide <a href="http://msdn.microsoft.com/library/en-us/msi/setup/logging.asp">Logging policy</a>, which creates a debug log in the Temp folder for each MSI operation. A somewhat less uninviting option is to set the system-wide <a href="http://msdn.microsoft.com/library/en-us/msi/setup/debug.asp">Debug policy</a> (to 7), and then use <a href="http://www.microsoft.com/technet/sysinternals/utilities/DebugView.mspx">DebugView</a> from Sysinternals to view the “live” debug log.</p> <p><img src="http://www.prairienet.org/%7Epops/repairdebugview.png" alt="DebugView MSI logging" width="764" height="248" /></p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-22720320771146799722008-11-17T00:43:00.001-08:002008-12-23T20:40:49.226-08:00Common property problems<h2><a name="propprobs"><br /></a></h2> <p>For MSI newcomers, a common hurdle appears to be figuring out that property names are case-sensitive, followed by figuring out what capitalization to use. Most common mistakes:</p> <ul><li><strong>Installed</strong>, not INSTALLED</li><li>Yet <strong>INSTALLDIR</strong>, not Installdir or InstallDir</li><li><strong>REMOVE</strong> (usu. in REMOVE="ALL" to detect uninstallation), not Remove</li><li><strong>TARGETDIR</strong>, not TargetDir or Targetdir or etc.</li></ul> <p>If you choose the wrong capitalization, MSI thinks you’re making up a new property with an empty value, meaning conditions that use the erroneous names probably won’t evaluate the way you want them to. ICE46 will help.</p> <p>And the most common resolutions to “How come my property value disappeared/went back to its default value?”–type problems:</p> <ul><li>Only the values of public properties—those with all-uppercase names: MYPROP, not MyProp—are passed from the UI sequence to the Execute sequence, so use a public property in your UI-sequence action or dialog box control if you want to use the value to make system changes using the Registry table, IniFile table, and so on.</li><li>While you’re reflecting on things, look into SecureCustomProperties.</li><li>If you’re calling MsiGetProperty, make sure the last argument (the value-buffer-size variable) is initialized to a value large enough to hold the property value. If you’re calling MsiGetProperty multiple times, reset the buffer size before each call.</li><li>As before, reading a property value during deferred execution (with Session.Property or MsiGetProperty) requires use of CustomActionData.</li></ul>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-48419028163419702012008-11-17T00:42:00.002-08:002008-12-23T20:40:49.227-08:00Script custom action notes<h2><a name="scriptca"><br /></a></h2> <p>Unsorted notes related to VBScript and JScript custom actions (assuming the world can’t <a href="http://blogs.msdn.com/robmen/archive/2004/05/20/136530.aspx">talk you out of it</a>):</p> <ul><li>Use CreateObject, not WScript.CreateObject.</li><li>Use Session.Property (or just plain Property) to get and set properties from a custom action:<br /><code>' <em>VBScript:</em><br />Session.Property("USERNAME") = "Valued Customer" ' <em>value must be a string</em><br />MsgBox "Hello, " & Session.Property("USERNAME")</code></li><li>For Directory-table properties, use <code>Session.TargetPath("CaseSensitivePropertyName")</code></li><li>Session.Property in a deferred custom action requires use of <a href="http://www.installshield.com/news/newsletter/0308-articles/CustomActionData.asp">CustomActionData</a>.</li><li>If you want to catch the return value from a script function, the script code must be stored in a file, and not in the CustomAction table.</li><li>Script custom actions cannot be run asynchronously. (I found this out only recently when I was experimenting with SpawnWaitDialog, about which <a href="http://www.prairienet.org/%7Epops/msi_tips.html#spawn">more later</a>.)</li></ul>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-61585598409334016612008-11-17T00:42:00.001-08:002008-12-23T20:40:49.227-08:00Taking inventory of installed products, features, and components<h2><a name="inventory"><br /></a></h2> <p>(Short version.)</p> <p>They’re not at all difficult to find, but some often overlooked MSI API functions to enumerate what’s installed on a system:</p> <ul><li>What products are installed: <em>MsiEnumProducts</em> or <em>MsiEnumProductsEx</em> (in VBScript, <em>Installer.Products</em> or <em>Installer.ProductsEx</em>)</li><li>What features are installed for a product: <em>MsiEnumFeatures</em> (<em>Installer.Features</em>)</li><li>What components are installed: <em>MsiEnumComponents</em> (<em>Installer.Components</em>)</li></ul> <p>Product and component information:</p> <ul><li>Installed product information (install location, date, version, that sort of thing): <em>MsiGetProductInfo</em> or <em>MsiGetProductInfoEx</em> (VBScript <em>Installer.ProductInfo</em>)</li><li>Installed component information: <em>MsiGetComponentPath</em> (<em>Installer.ComponentPath</em>)</li><li>Given a component, which products use it: <em>MsiEnumClients</em> (<em>Installer.ComponentClients</em>)</li></ul> <p>Product, feature, component states (installed? advertised? etc.):</p> <ul><li><em>MsiQueryProductState</em>, <em>MsiQueryFeatureState</em>, <em>MsiQueryComponentState</em> (<em>Installer.ProductState/FeatureState/ComponentState</em>)</li></ul>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-35113626894092500542008-11-17T00:41:00.003-08:002008-12-23T20:40:49.227-08:00Launching a batch file in a custom action<h2><a name="bat"><br /></a></h2> <p>To launch a batch file from a custom action, you can’t just specify the .bat file as the executable to run; instead, you can launch cmd.exe or command.com, depending on the platform, with the path to the batch file as an argument. Instead of hard-coding the path to the command processor—which plenty of people seem to think is just fine—you can expand the COMSPEC environment variable and launch the result.</p> <p>There’s probably a better way, but a two-step process for launching a batch file that you’re installing is:</p> <ul><li>Create a Type-51 (set a property) custom action, with source <strong>COMSPEC</strong> and target <strong>[%COMSPEC]</strong>. It should be an immediate-mode custom action that goes somewhere in the Execute sequence.</li><li>Next, create a Type-50 (launch an executable whose path is in a property) action with source <strong>COMSPEC</strong> and target <strong>/c "[INSTALLDIR]LaunchMe.bat"</strong> (or whatever the path to the file is). This should be a deferred action (add 1024 to the type), possibly without impersonation (add another 2048, for a grand total of action type 3122), scheduled after InstallFiles (since it’s a file you’re installing).</li></ul> <div class="aside"> <p>Pop quiz: why can’t we just get rid of the first action and use [%COMSPEC] in the source of the second action?</p> </div> <p><a href="http://www.prairienet.org/%7Epops/msi_tips.html#unfix">As usual</a>, to run the actions only during the initial installation, give the actions the condition <strong>Not Installed</strong>, or, better yet, use the <strong>$<em>ComponentName</em>=3</strong> type of condition.</p> <p>(At this point, I might as well admit that I don’t know an automatic way to hide the command prompt window.)</p> <p>Keep in mind that you don’t need to launch a batch file to launch something that’s already in the form of an executable. For example, I’ve seen installers that launch a batch file just to run <span class="filename">net.exe</span> or <span class="filename">attrib.exe</span>. I’ve seen things you wouldn’t believe.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-23729169222890260752008-11-17T00:41:00.002-08:002008-12-23T20:40:49.227-08:00Application Searching<h2><a name="appsearching"><br /></a></h2> <p>The AppSearch action is typically used to search for a file on the target system, and populates the value of a public property with the full path to the file if it exists. (AppSearch can also be used to read data from the registry or an INI file in [WindowsFolder], but it’s not really “searching”.) A record in the AppSearch table contains the name of the public property to be populated with the results, and the primary key of a record in the Signature table; which in turn contains the file name, along with an optional range of acceptable versions, range of sizes, range of dates, and a language for the file. In addition, the DrLocator table—not sure why it’s not the “DirLocator” table—specifies the directory and number of levels of its subdirectories in which to search.</p> <p>The AppSearch table is processed by the AppSearch action, which occurs early in the UI sequence. (Also early in the Execute sequence, in case of a silent or other non–full UI installation, but never mind that for now.)</p> <p>Naturally, AppSearch can take a while to execute, so it’s a courtesy to display information about what’s taking so long. To handle this, schedule a modeless dialog in the User Interface sequence before AppSearch (in the UI sample from the Platform SDK, the corresponding dialog box is called “PrepareDlg”). On this dialog box, you can place Text controls that subscribe to the ActionText and ActionData control events. Finally, in the ActionText table, specify appropriate values for the AppSearch action.</p> <p>In the following figure, the AppSearch record in the ActionText table has the text beginning “ActionText says:” in the Description field, and the text beginning “ActionData says:” in the Template field.</p> <p><img src="http://www.prairienet.org/%7Epops/appsearching.png" alt="AppSearch in action" width="504" height="299" /></p> <p>The ActionData/Template value doesn’t add much to it—just diplaying the property and signature names—so nobody would blame you for leaving it out.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-87719839782679474862008-11-17T00:41:00.001-08:002008-12-23T20:40:49.227-08:00Merge modules and properties<h2><a name="msmprop"><br /></a></h2> <p><a href="http://www.prairienet.org/%7Epops/msi_tips.html#expprop">As you know</a>, you can expand the values of your MSI package’s properties—for example, in registry or INI data—at run time using [PropName] expressions. Something that’s a bit trickier is to use the values of properties that you’ve defined in a merge module.</p> <p>The idea is that every merge module has a unique identifier, which is stored in the ModuleSignature table. (You can stop reading if you create merge modules by hand; this is useful only if your development environment hides these details.) An identifier looks like <em>ModuleName</em>.<em>HHHHHHHH_HHHH_HHHH_HHHH_HHHHHHHHHHHH</em>, where the <em>HHHH_etc.</em> number is a GUID with the curly brackets removed and the hyphens replaced with underscores. Many primary keys in your merge module database (your MSM file) are decorated with that <em>.HHHH_etc.</em> suffix, which means that component names, Registry-table keys, and (the reason we’re talking about this) Property-table and Directory-table keys have that quasi-GUID appended.</p> <p>For example, suppose you have a property called MERGE_MODULE_PROPERTY defined in your merge module project. If you merge your merge module into a full MSI package and <a href="http://www.prairienet.org/%7Epops/msi_tips.html#log">create a log file</a> while deploying the MSI package, mixed in with the main MSI’s properties you’ll see entries that look like this:</p> <pre>Property(C): WindowsFolder = C:\WINDOWS\<br />Property(C): WindowsVolume = C:\<br />Property(C): <strong>MERGE_MODULE_PROPERTY.EEEEEEEE_EEEE_EEEE_EEEE_EEEEEEEEEEEE</strong> = msm property value<br />Property(C): VersionNT = 501</pre> <p>Therefore, if you want to expand the value of your merge module property at run time, you’ll need to use the [PROP.HHHHHHHH_HHHH_HHHH_HHHH_HHHHHHHHHHHH] format.</p> <p>Moreover, if you see other log entries with that kind of suffix, the attached item probably comes from a merge module.</p> <p>Note that the decorations go only one way: if your merge module uses undecorated [PROPNAME] somewhere, the property (if there is one) from the consuming MSI package will be expanded normally.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-21417175830462642932008-11-17T00:40:00.004-08:002008-12-23T20:40:49.227-08:00Logging switches<h2><a name="log"><br /></a></h2> <p>To be overwhelmed by information about what an MSI installer is doing, run the following from a command prompt:</p> <pre>msiexec /i ProductName.msi /L*v everything.log</pre> <p>In particular, the <strong>*v</strong> following the <strong>/L</strong> switch specifies to do verbose logging of everything the installer does.</p> <p>Trouble is—which you know because I telegraphed the punchline—it’s often way more than you wanted. The MSI help topic <a href="http://msdn.microsoft.com/library/en-us/msi/setup/command_line_options.asp">“Command-Line Options”</a> (or running <strong>msiexec /?</strong>) lists other, more specific switches that can follow <strong>/L</strong>. In particular, you can log just the properties like this:</p> <pre>msiexec /i product.msi <strong>/Lp</strong> properties.log</pre> <p>The output has just entries like this:</p> <pre>=== Logging started: 0/0/0000 00:00:00 ===<br />Property(S): DiskPrompt = [1]<br />Property(S): UpgradeCode = {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH}<br />Property(S): ProductToBeRegistered = 1<br />Property(S): SourcedirProduct = {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH}<br /> ... many more ...<br />Property(C): DiskPrompt = [1]<br />Property(C): UpgradeCode = {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH}<br />Property(C): ALLUSERS = 1<br />Property(C): PrimaryVolumeSpaceRemaining = 0<br />Property(C): PrimaryVolumeSpaceRequired = 0<br /> ... etc. ...<br />=== Logging stopped: 0/0/0000 00:00:00 ===</pre> <div class="aside"> <p>Pop quiz: why do the client (C) properties appear <em>after</em> the server (S) properties?</p> </div> <p> </p> <div class="aside"> <p>And a tip: to see what properties changed or appeared between the (C) and (S) sides, run a command like this:</p> <pre>sort /+13 properties.log</pre> <p>The output looks something like this:</p> <pre>Property(C): ACTION = INSTALL<br />Property(S): ACTION = INSTALL<br />Property(S): ADDLOCAL = FeatureName<br />Property(S): AdminToolsFolder = C:\Documents and Settings\All Users\Start Menu\<br /> Programs\Administrative Tools\<br />Property(C): AdminToolsFolder = C:\Documents and Settings\username\Start Menu\<br /> Programs\Administrative Tools\<br />Property(S): AdminUser = 1<br />Property(C): AdminUser = 1</pre> <p>…and so on.</p> </div> <p>Similarly, to display just information about action starts, stops, and return values, use <strong>/Li</strong>. The log starts something like this:</p> <pre>=== Logging started: 0/0/0000 00:00:00 ===<br />Action start 00:00:00: INSTALL.<br />Action start 00:00:00: AppSearch.<br />Action ended 00:00:00: AppSearch. Return value 0.<br />Action start 00:00:00: LaunchConditions.<br />Action ended 00:00:00: LaunchConditions. Return value 0.<br />Action start 00:00:00: FindRelatedProducts.<br />Action ended 00:00:00: FindRelatedProducts. Return value 0.<br />Action start 00:00:00: ValidateProductID.<br />Action ended 00:00:00: ValidateProductID. Return value 1.<br />Action start 00:00:00: CostInitialize.<br />Action ended 00:00:00: CostInitialize. Return value 1.<br />... etc. ...</pre> <p>The MSI help topic “Logging of Action Return Values” describes what these return values mean.</p> <p>I have no idea what the <strong>c</strong> and <strong>u</strong> switches do.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-63843737681321581162008-11-17T00:40:00.003-08:002008-12-23T20:40:49.227-08:00Add or Remove Programs properties<h2><a name="arp"><br /></a></h2> <p>A Windows Installer installation usually creates a product entry in the Add or Remove Programs list, similar to the following:</p> <p><img src="http://www.prairienet.org/%7Epops/arp.png" alt="Product's main ARP entry" width="730" height="173" /></p> <p>If you want to hide the Remove button, set ARPNOREMOVE to 1 in the Property table or from the command line. If you want to hide the Change button, set ARPNOMODIFY to 1. (If you want to annoy users, set both properties to 1.) You can suppress the whole entry by setting ARPSYSTEMCOMPONENT to 1.</p> <div class="aside"> <p>Setting ARPSYSTEMCOMPONENT only hides the Add or Remove Programs entry; it doesn’t suppress creation of the information used to uninstall the product. Launching the MSI a second time still runs maintenance mode, and so forth. To suppress creation of the uninstall information, you can remove or “condition out” the actions RegisterProduct, RegisterUser, PublishProduct, and PublishFeatures.</p> </div> <p>The following figure shows the properties that control display text in the Support Info panel. (Of course, the Version field uses ProductVersion, and ProductName shows up a couple of times.) The hyperlinked manufacturer name is backed by the URL in the ARPURLINFOABOUT property.</p> <p><img src="http://www.prairienet.org/%7Epops/supportinfo.png" alt="Product's ARP support info" width="304" height="299" /></p> <p>If you leave any of these properties undefined, the corresponding line won’t be displayed in the Support Info panel. For example, leaving ARPHELPTELEPHONE unset causes the Support Telephone entry to be omitted. Moreover, setting ARPNOREPAIR to 1 hides the “If this program is not working…” paragraph and the Repair button.</p> <p>Note that these ARP- properties have no effect on the maintenance-type dialog box usually displayed when a user launches an installer a second time or clicks Change on the Add or Remove Programs panel.</p> <p><br /></p> <p>To modify this dialog box, modify the Dialog-Control-RadioButton-whatever tables of your MSI database or use your environment’s graphical dialog editor.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-91591391856619922452008-11-17T00:40:00.001-08:002008-12-23T20:40:49.227-08:00Some property names<h2><a name="odd"><br /></a></h2> <p>Shortest private property names (4 letters)</p> <ul><li>Date</li><li>Time</li></ul> <p>Shortest public property name (5)</p> <ul><li>PATCH</li></ul> <p>Longest public property name (31)</p> <ul><li>MSIENFORCEUPGRADECOMPONENTRULES</li></ul> <p>Longest private property name (33)</p> <ul><li>MsiNTSuiteSmallBusinessRestricted</li></ul> <p>Properties with triple letters</p> <ul><li>A<strong>DDD</strong>EFAULT</li><li>FILEA<strong>DDD</strong>EFAULT</li><li>ARPINSTA<strong>LLL</strong>OCATION</li><li>INSTA<strong>LLL</strong>EVEL</li></ul>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-66001725795124050562008-11-17T00:39:00.004-08:002008-12-23T20:40:49.228-08:00File versions vs. ProductVersion<h2><a name="versions"><br /></a></h2> <p>Major upgrades in Windows Installer use only the first three fields of the ProductVersion property: the FindRelatedProducts action won’t distinguish version 1.2.3.4 of a product from version 1.2.3.5.</p> <p>Some take this to mean that file versions in the File table are limited to three fields, which isn’t the case. The Version field of the File table uses the Version data type, described as <em>xxx.xxx.xxx.xxx</em>, where each field is an integer from 0 through 65536.</p> <p>To demonstrate this, create a file called <span class="filename">versions.exe</span> with version 1.0.0.0 and place it in (say) C:\Program Files\Versions, and create another copy with version 1.0.0.1, adding it to an installer that installs it to that same directory. If you create a log file with <code>msiexec /i version_test.msi /L*v everything.log</code>, you can search for “file:” and find this (edited):</p> <pre>MSI (s): Executing op: FileCopy (SourceName=versions.exe, DestName=versions.exe,<br /> Version=<strong>1.0.0.1</strong>, ...)<br />MSI (s): File: C:\Program Files\Versions\versions.exe; <strong>Overwrite</strong>; Won't patch;<br /> <strong>Existing file is a lower version</strong></pre> <p>Or I guess you could just have checked to see if the new file was installed.</p> <p>If MSI considered the versions identical, the log message would be (strange capitalization and all):</p> <pre>MSI (s): File: C:\Program Files\Versions\versions.exe; <strong>Won't Overwrite</strong>; Won't patch;<br /> <strong>Existing file is of an equal version</strong></pre>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-43240104411251214232008-11-17T00:39:00.003-08:002008-12-23T20:40:49.228-08:00Fixing up a failed uninstall<h2><a name="unfix"><br /></a></h2> <p>Windows Installer caches a product’s MSI database in the hidden directory %WINDIR%\Installer, which is how users can uninstall without having to put the CD back in. (In MSI Automation, Installer.ProductInfo with constant LocalPackage will tell you where the cached package is; ditto MsiGetProductInfo with INSTALLPROPERTY_LOCALPACKAGE.) By default, maintenance operations such as repairs use this cached database, which is why testing is easier if you uninstall an old version before installing a new one: your changes in a new build will ordinarily not be available because they’re not in the cached database.</p> <p>Trouble arises if you have a custom action that crashes during uninstallation: you can’t just make a new build without the error and run it, since maintenance mode will continue to use the cached MSI database.</p> <p>(A common beginner mistake is not realizing that the same sequences are used for both installation and uninstallation, and therefore a custom action with no condition will run for installation, repairs, modifications, and uninstallation. Not that you asked, but the condition <strong>Not Installed</strong> succeeds for a first-time installation, and <strong>REMOVE="ALL"</strong> will work in the Execute sequence after InstallValidate to detect a complete uninstallation. Mind the capitalization and quotation marks.)</p> <p>To re-cache the MSI database so a subsequent uninstallation will work, deploy the new build (with the error removed), setting the REINSTALLMODE property to include the letter <em>v</em>, as in:</p> <pre>msiexec /i product.msi REINSTALLMODE=<strong>v</strong>oums REINSTALL=ALL</pre> <p>This is how minor upgrades are deployed, too, of course.</p> <p>Occasionally you’ll hear suggestions to use the Windows Installer Cleanup Utility or msizap, which is overdoing things, or to find and edit the cached MSI database in the hidden Installer directory, which is just crazy.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-1255737658914745052008-11-17T00:39:00.001-08:002008-12-23T20:40:49.228-08:00Avoiding custom actions by using the -File tables<h2><a name="avoid"><br /></a></h2> <p>It has often been remarked that one should avoid using custom actions if a built-in table and action will do. I’ll repeat the remark in the hope that it will help: Don’t use a custom action if a built-in table and action will do.</p> <p>For example, my heart sinks every time I see someone using VBScript custom actions and the FileSystemObject to manipulate files, when three tables will handle many common cases: the <strong>RemoveFile</strong> table, the <strong>DuplicateFile</strong> table, and the <strong>MoveFile</strong> table. Taking each one in turn:</p> <p>The <strong>RemoveFile</strong> table is where you specify files that you want to remove during uninstallation (most common case), installation, or both. (In each of these tables, and in fact most tables related to data transfer, the action is tied to a component. In this case, RemoveFile records are associated with a component, and the file is removed when the associated component is installed or uninstalled.) The removal occurs when the RemoveFiles action runs, which must be before InstallFiles runs.</p> <p>For example, suppose you know that on first launch, your product will create a file called <span class="filename">file_to_remove.ext</span> in the main program directory, represented by the directory property INSTALLDIR. (The main directory property name might be different depending on the development environment or help file you’re using.) Windows Installer will normally err on the side of caution during uninstallation and leave behind any files it didn’t install, but to remove the file at uninstallation time, you can add a record similar to the following to the RemoveFile table.</p> <table border="1"> <tbody><tr><td><strong>Field name</strong></td><td><strong>Sample value</strong></td><td><strong>Remarks</strong></td></tr> <tr><td>FileKey</td><td>RemoveMyFile</td><td>arbitrary identifier for this record</td></tr> <tr><td>Component_</td><td>main_exe</td><td>pick a component</td></tr> <tr valign="top"><td>FileName</td><td>file_to_remove.ext</td><td>can use wildcards; leave blank to remove empty directory; won’t delete subdirectories</td></tr> <tr valign="top"><td>DirProperty</td><td>INSTALLDIR</td><td>must be property with no brackets; can’t be raw path</td></tr> <tr valign="top"><td>InstallMode</td><td>2</td><td>that is, when component “main_exe” is removed</td></tr> </tbody></table> <p>Having set this up, when you uninstall your product, <span class="filename">file_to_remove.ext</span> will be removed instead of being left behind.</p> <div class="aside"> <p>For some reason, the RemoveRegistry table removes extra registry information during installation but not uninstallation. To remove extra registry information during uninstallation, look into the hyphen “<code>-</code>” flag for the Registry table.</p> </div> <p>The <strong>DuplicateFile</strong> table is where you specify files that you want to copy, assuming you also installed the files with the File table. The following example copies <span class="filename">file_to_copy.ext</span> to INSTALLDIR with the new name <span class="filename">newname.ext</span>, assuming the main_exe component has been selected to be installed locally.</p> <table border="1"> <tbody><tr><td><strong>Field name</strong></td><td><strong>Sample value</strong></td><td><strong>Remarks</strong></td></tr> <tr><td>FileKey</td><td>DuplicateMyFile</td><td>arbitrary identifier</td></tr> <tr><td>Component_</td><td>main_exe</td><td>pick one</td></tr> <tr><td>File_</td><td>file_to_copy.ext</td><td>identifier from File table</td></tr> <tr valign="top"><td>DestName</td><td>newname.ext</td><td>new name if you want one, blank if you don’t</td></tr> <tr><td>DestFolder</td><td>INSTALLDIR</td><td>property with no brackets</td></tr> </tbody></table> <p>These files are processed by the DuplicateFiles action, which must occur after InstallFiles.</p> <p>The <strong>MoveFile</strong> table is similar to the DuplicateFile table, but the files that you want to move or copy need not have been installed with the File table. The files are moved when the MoveFiles action runs (before InstallFiles), and will not be removed when the product is removed.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-68812383022841715352008-11-17T00:38:00.000-08:002008-12-23T20:40:49.228-08:00Expanding properties at run time<h2><a name="expprop"><br /></a></h2> <p>MSI database fields that use the <em>Formatted</em> data type can take expressions of the form <strong>[PropertyName]</strong>, and the value will be expanded at run time. The [expression] doesn’t need to be the whole field; for example, you can put the following in a registry value and the appropriate parts of the oddly phrased sentence will be expanded at run time:</p> <pre>Installed to [INSTALLDIR] by [USERNAME] from account [LogonUser] at [Time] on [Date].</pre> <p>As with all things property-related, capitalization (and spelling) matter.</p> <p>You can tell the data type of a field by looking at the Windows Installer help library topic for the given table. The topic <a href="http://msdn.microsoft.com/library/en-us/msi/setup/registry_table.asp">“Registry Table”</a> indicates that the Name and Value fields use the Formatted data type, which means that property values contained in those fields will be expanded. On the other hand, the Name and Description fields of the Shortcut table use other data types (Filename and Text), and therefore don’t expand properties.</p> <p>(See the topic <a href="http://msdn.microsoft.com/library/en-us/msi/setup/formatted.asp">“Formatted”</a> for other expressions that will get expanded, such as [%ENV_VAR] for environment variables and [\[] and [\]] for literal square-bracket characters.)</p> <p>While we’re on the subject, a field that uses the Identifier data type doesn’t need square brackets around it. For example, the DirProperty field of the RemoveFile table accepts a directory property such as AppDataFolder, and does not take brackets.</p>IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0tag:blogger.com,1999:blog-1793985215810462453.post-73732798393731153182008-11-17T00:36:00.000-08:002008-12-23T20:40:49.228-08:00MSI Basics<h1><br /></h1> <p>Microsoft Installer, an installer system written by Microsoft for Windows platforms.</p> <img src="http://www.dalun.com/wix/msi.png" /> MSI files are basically relational database files that contain all the information that the Windows Installer requires to install or uninstall an application and to run the setup user interface. Installation packages are organized like the diagram above. Each package has one or more independent features. Each feature can have one or more components. The installer always installs or removes a component from a user's computer as a coherent piece. A component can be a single file, or a group of files, a registry setting, COM objects, resources, etc. <h2>Installation Mechanism</h2>There are two phases to a successful installation process: acquisition and execution. If the installation is unsuccessful, a rollback phase may occur. <h3>Acquisition</h3>At the beginning of the acquisition phase, an application or a user instructs the installer to install a feature or an application. The installer then progresses through the actions specified in the sequence tables of the installation database. These actions query the installation database and generate a script that gives a step-by-step procedure for performing the installation. <h3>Execution</h3> During the execution phase, the installer passes the information to a process with elevated privileges and runs the script. <h3>Rollback</h3>If an installation is unsuccessful, the installer restores the original state of the computer. When the installer processes the installation script it simultaneously generates a rollback script. In addition to the rollback script, the installer saves a copy of every file it deletes during the installation. These files are kept in a hidden, system directory. Once the installation is complete, the rollback script and the saved files are deleted. For more information, see Rollback Installation.IRecruiterhttp://www.blogger.com/profile/10139242281040427298noreply@blogger.com0