<?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>Ruslan Ulanov's Codeshack &#187; InstallShield</title>
	<atom:link href="http://ulanoff.com/blogs/codeshack/tag/installshield/feed/" rel="self" type="application/rss+xml" />
	<link>http://ulanoff.com/blogs/codeshack</link>
	<description>The developer's notebook</description>
	<lastBuildDate>Tue, 29 Sep 2009 00:33:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Regular Expressions in InstallScript</title>
		<link>http://ulanoff.com/blogs/codeshack/2009/07/20/regular-expressions-in-installscript/</link>
		<comments>http://ulanoff.com/blogs/codeshack/2009/07/20/regular-expressions-in-installscript/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 19:16:35 +0000</pubDate>
		<dc:creator>Ruslan Ulanov</dc:creator>
				<category><![CDATA[Installer]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[InstallShield]]></category>

		<guid isPermaLink="false">http://ulanoff.com/blogs/codeshack/?p=42</guid>
		<description><![CDATA[If you&#8217;ve ever had to parse strings in InstallShield&#8217;s InstallScript, you&#8217;d know that a few of InstallShield&#8217;s built-in String Functions might not be enough. Regular Expressions are a way to go, but unfortunatelly Acresso didn&#8217;t implement them (yet?) in their product. This post from Acresso Community might have a solution for you (at least until Acresso will figure out [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever had to parse strings in InstallShield&#8217;s InstallScript, you&#8217;d know that a few of InstallShield&#8217;s built-in String Functions might not be enough. Regular Expressions are a way to go, but unfortunatelly Acresso didn&#8217;t implement them (yet?) in their product.</p>
<p>This post from Acresso Community might have a solution for you (at least until Acresso will figure out a way to implement RegEx natively in their products).</p>
<p><span id="more-42"></span></p>
<p><strong>Problems calling VBScript/COM objects from InstallScript</strong><br />
Dated: 07-14-2006, 11:17 AM</p>
<p>Can anyone tell whats wrong with this function?<br />
It is supposed to create an VBscript Regexp object and then test a string against the expression and return the result of the test (TRUE/FALSE).<br />
It always returns FALSE, even when it obviously should be TRUE &#8211; tested a simple expression. Am I missing something in how to call VBScript/COM objects and test return codes?</p>
<p>Code:</p>
<div>
<pre style="margin: 0px;width: 640px;height: 434px;text-align: left;border: 1px inset;padding: 6px">prototype BOOL ValidateString(STRING, STRING);
function BOOL ValidateString(szString,szPattern)
OBJECT oRegEx, oMatch;
BOOL MatchFound;
begin

	//try to create the RegEx object
	try
		set oRegEx = CreateObject("VBScript.RegExp");
	catch
		MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
	endcatch;

	oRegEx.Pattern = szPattern;
	oRegEx.IgnoreCase = 0;
	oRegEx.Global = 1;  //set to 1 to find all matches in the string
			//set to 0 to find only the first match
	try
		set oMatch = oRegEx.Execute(szString);
	catch
		MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
	endcatch;

	MatchFound = (oMatch.Count &gt; 0);
	return MatchFound;
end;</pre>
</div>
<p>Actually, that was a second attempt. The initial attempt was to call the Test method of REGEX directly, but that didn&#8217;t work either.</p>
<div>
<div class="smallfont">Code:</div>
<pre style="margin: 0px;width: 640px;height: 338px;text-align: left;border: 1px inset;padding: 6px">prototype BOOL ValidateString(STRING, STRING);
function BOOL ValidateString(szString,szPattern)
OBJECT oRegEx;
BOOL MatchFound;
begin

	//try to create the RegEx object
	try
		set oRegEx = CreateObject("VBScript.RegExp");
	catch
		MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
	endcatch;

	oRegEx.Pattern = szPattern;
	oRegEx.IgnoreCase = 0;
	oRegEx.Global = 1;  //set to 1 to find all matches in the string
			//set to 0 to find only the first match
	MatchFound = oRegEx.Test(szString);
	return MatchFound;
end;</pre>
</div>
<p>This is being #included into a setup.rul in an InstallScriptMSI project.</p>
<div class="smallfont"> <strong>Solved it!!</strong><br />
Dated: 07-14-2006, 01:09 PM</div>
<hr size="1" /><!-- / icon and title --><!-- message --></p>
<div id="post_message_358149">Turns out I only needed to declare the Pattern variable as a &#8220;VARIANT&#8221;.<br />
Can be taken care of in the PROTOTYPE declaration:</p>
<div>
<div class="smallfont">Code:</div>
<pre style="margin: 0px;width: 640px;height: 34px;text-align: left;border: 1px inset;padding: 6px">prototype BOOL ValidateString(STRING, VARIANT);</pre>
</div>
<p>The second set of code works great as a regular expression tester if anyone else is looking for one. Use the above prototype and this code:</p>
<div>
<div class="smallfont">Code:</div>
<pre style="margin: 0px;width: 640px;height: 290px;text-align: left;border: 1px inset;padding: 6px">function BOOL ValidateString(szString,szPattern)
OBJECT oRegEx;
BOOL MatchFound;
begin

	//try to create the RegEx object
	try
		set oRegEx = CoCreateObject("VBScript.RegExp");
	catch
		MessageBox("CoCreateObject Failed- "+ Err.Decription, SEVERE);
	endcatch;
	oRegEx.Pattern = szPattern;
	oRegEx.IgnoreCase = 0;
	MatchFound = oRegEx.Test(szString);
	set oRegEx = NOTHING;
	return MatchFound;
end;</pre>
</div>
</div>
<p>The original forum thread started by user <a href="http://community.installshield.com/member.php?u=12978">Rincewind</a> could be found <a href="http://community.installshield.com/showthread.php?t=160858">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ulanoff.com/blogs/codeshack/2009/07/20/regular-expressions-in-installscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InstallShield Skinning</title>
		<link>http://ulanoff.com/blogs/codeshack/2009/02/20/installshield-skinning/</link>
		<comments>http://ulanoff.com/blogs/codeshack/2009/02/20/installshield-skinning/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 21:20:37 +0000</pubDate>
		<dc:creator>Ruslan Ulanov</dc:creator>
				<category><![CDATA[Installer]]></category>
		<category><![CDATA[InstallShield]]></category>

		<guid isPermaLink="false">http://ulanoff.com/blogs/codeshack/?p=16</guid>
		<description><![CDATA[Ever wanted to get rid of the InstallShield branding on custom skins? Now you can! Just download the attached ZIP file and use the files in this ZIP to create your skins. It works just like the original skin toolkit. Happy skinning&#8230; Elmery Source: Acresso Community forums. Disclaimer: Neither I nor my employer endorse the practice [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Ever wanted to get rid of the InstallShield branding on custom skins? Now you can! Just download the attached ZIP file and use the files in this ZIP to create your skins. It works just like the original skin toolkit.</p>
<p>Happy skinning&#8230;</p>
<p>Elmery</p></blockquote>
<p><span id="more-16"></span></p>
<p>Source: <a href="http://community.installshield.com/showthread.php?s=&amp;threadid=129033">Acresso Community forums</a>.</p>
<p>Disclaimer: Neither I nor my employer endorse the practice of stealing IP. Please respect the owner of the software and the hard labor of programmers behind the product. Put the reference to InstallShield somewhere in your custom skin.</p>
<p><a href="http://ulanoff.com/blogs/codeshack/files/2009/02/skindev.zip">skindev.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ulanoff.com/blogs/codeshack/2009/02/20/installshield-skinning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
