<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chad Sturtz &#187; InstallShield</title>
	<atom:link href="http://chadsturtz.com/category/installshield/feed/" rel="self" type="application/rss+xml" />
	<link>http://chadsturtz.com</link>
	<description>A Journey Through Software</description>
	<lastBuildDate>Wed, 04 May 2011 15:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Basic MSI Project: Setup.exe Custom Command-Line Arguments</title>
		<link>http://chadsturtz.com/2010/02/basic-msi-project-setup-exe-custom-command-line-arguments/</link>
		<comments>http://chadsturtz.com/2010/02/basic-msi-project-setup-exe-custom-command-line-arguments/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 19:28:18 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[InstallShield]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=53</guid>
		<description><![CDATA[This one eluded me for way too long considering how straight-forward it is.  So, in an effort to help others who may have the same question, I thought I&#8217;d write it down.. Problem: For a Basic MSI Project in InstallShield 2009, I need to pass in 1 or more custom command-line arguments to use during [...]]]></description>
			<content:encoded><![CDATA[<p>This one eluded me for way too long considering how straight-forward it is.  So, in an effort to help others who may have the same question, I thought I&#8217;d write it down..</p>
<p><strong>Problem:</strong> For a Basic MSI Project in InstallShield 2009, I need to pass in 1 or more custom command-line arguments to use during installation/un-installation/etc.<br />
<br/><br/><br />
<h2><strong>Step 1 &#8211; Accessing your custom command-line arguments</strong></h2>
<p>First, accessing these values are as easy as accessing other variables in InstallShield.  All you need to do is use the format [MYARGUMENTNAME].  So, for example, if you want to use one of the arguments when invoking an executable from a custom action, it may look like this image below.  My custom action is invoking an executable called <strong>myapp.exe</strong> and I am accessing a custom command line argument named <strong>FILENAME</strong> to use as part of the invocation of my executable.</p>
<p><img class="size-full wp-image-54 alignnone" title="example1" src="http://chadsturtz.com/wp-content/uploads/2010/02/example1.PNG" alt="example1" width="786" height="405" /><br />
<br/><br/><br />
<h2><strong>Step 2 &#8211; Passing in your custom command-line arguments</strong></h2>
<p>It&#8217;s really this simple.. each argument needs to be preceeded by a /v and wrapped in quotes.  Continuing the example above, here is how I pass in my custom command line argument named FILENAME:</p>
<pre>     <em>setup.exe /v"FILENAME=\"myfile.txt\""
</em></pre>
<p><em> </em></p>
<p>This would result in my custom action invoking my executable as follows:   <em>myapp.exe -f myfile.txt</em></p>
<p>To be clear on multiple custom command-line arguments, the following example adds a second argument to my example above:</p>
<pre>     <em>setup.exe /v"FILENAME=\"myfile.txt\"" /vSECONDARGUMENT=\"value2\""
</em></pre>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/02/basic-msi-project-setup-exe-custom-command-line-arguments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

