<?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>AB-WebLog.com&#187; Inno Setup</title>
	<atom:link href="http://www.ab-weblog.com/en/tag/inno-setup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ab-weblog.com/en</link>
	<description>Andreas Breitschopp</description>
	<lastBuildDate>Wed, 18 Mar 2015 09:47:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Developing a Browser Toolbar: Installation System (4/5)</title>
		<link>http://www.ab-weblog.com/en/developing-a-browser-toolbar-installation-system/</link>
		<comments>http://www.ab-weblog.com/en/developing-a-browser-toolbar-installation-system/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 14:00:33 +0000</pubDate>
		<dc:creator>Andreas Breitschopp</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ASPects]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[Inno Setup]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[publication]]></category>
		<category><![CDATA[toolbar]]></category>

		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=293</guid>
		<description><![CDATA[This post series reflects my article &#8220;Developing a Browser Toolbar&#8221; published in the ASPects in January 2010 (Volume 23, Issue 1), a magazine of the Association of Shareware Professionals (ASP). Now we have a toolbar for Internet Explorer and Firefox, &#8230; <a href="http://www.ab-weblog.com/en/developing-a-browser-toolbar-installation-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>This post series reflects my article &#8220;Developing a Browser Toolbar&#8221; published in the <a title="ASPects Website" href="http://www.asp-shareware.org/about/aspects.asp" target="_blank">ASPects</a> in January 2010 (Volume 23, Issue 1), a magazine of the <a title="Association of Shareware Professionals Website" href="http://www.asp-shareware.org" target="_blank">Association of Shareware Professionals</a> (ASP).</em></p>
<p>Now we have a toolbar for Internet Explorer and Firefox, but how do we get them installed? There is only one installation tool I&#8217;m using also for all my other products that can do almost everything: <a title="Inno Setup Website" href="http://www.jrsoftware.org/isinfo.php" target="_blank">Inno Setup</a>. Here is what you need for the installation of both toolbar versions.</p>
<h2>Mozilla Firefox Toolbar Installation</h2>
<p>Again it is much easier to install a new toolbar for the Firefox browser. You only need to copy your XPI file to the Firefox extension directory. The toolbar will then be installed at the next browser start. So we need only one additional Pascal function in our Inno Setup code to figure out the extension directory of Firefox:</p>
<pre class="brush: pascal; gutter: true">function GetFirefoxExtensionsPath(Param: String): String;
var
    FirefoxVersion, FirefoxInstallPath: string;
begin
    if (RegQueryStringValue(HKLM, 'SOFTWARE\Mozilla\Mozilla Firefox',
            'CurrentVersion', FirefoxVersion)) then begin
        if (RegQueryStringValue(HKLM, 'SOFTWARE\Mozilla\Mozilla Firefox\' + FirefoxVersion +
                '\Main', 'Install Directory', FirefoxInstallPath)) then begin
            if (not DirExists(FirefoxInstallPath +
                   '\extensions\toolbarebay@ab-tools.com')) then begin
                Result := FirefoxInstallPath + '\extensions';
            end;
        end;
    end;
end;</pre>
<h2>Microsoft Internet Explorer Toolbar Installation</h2>
<p>To install the toolbar for the Internet Explorer we first have to register the <em>strongly-named assembly</em> in the <em>Global Assembly Cache</em> (GAC) by using the <em>gacinstall</em> flag of the <em>file</em> section provided in the current Inno Setup version. Additionally we need to make quite a few registry changes. You can copy the following code into the <em>registry</em> section of your Inno Setup script and replace all variables by your own values (I&#8217;ve shortened the Inno Setup syntax a little bit to get it more compact):</p>
<pre class="brush: text; gutter: true">HKCR: CLSID\{{%GUID%}; Flags: uninsdeletekey
HKCR: CLSID\{{%GUID%}; ValueType: string; ValueName: ; ValueData: %LONG_NAME%
HKCR: CLSID\{{%GUID%}; ValueType: string; ValueName: MenuText; ValueData: %LONG_NAME%
HKCR: CLSID\{{%GUID%}; ValueType: string; ValueName: HelpText; ValueData: %DESCRIPTION%
HKCR: CLSID\{{%GUID%}\Implemented Categories\{{00021494-0000-0000-C000-000000000046}
HKCR: CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: ; ValueData: mscoree.dll
HKCR: CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Both
HKCR: CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: Class; ValueData: %CLASS%
HKCR: CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: Assembly; ValueData: %NAMESPACE%, Version=%VERSION%, Culture=neutral, PublicKeyToken=%PUBLIC_KEY%
HKCR: CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: RuntimeVersion; ValueData: v2.0.50727
HKLM: Software\Classes\CLSID\{{%GUID%}; Flags: uninsdeletekey
HKLM: Software\Classes\CLSID\{{%GUID%}; ValueType: string; ValueName: ; ValueData: %LONG_NAME%
HKLM: Software\Classes\CLSID\{{%GUID%}; ValueType: string; ValueName: MenuText; ValueData: %LONG_NAME%
HKLM: Software\Classes\CLSID\{{%GUID%}; ValueType: string; ValueName: HelpText; ValueData: %DESCRIPTION%
HKLM: Software\Classes\CLSID\{{%GUID%}\Implemented Categories\{{00021494-0000-0000-C000-000000000046}
HKLM: Software\Classes\CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: ; ValueData: mscoree.dll
HKLM: Software\Classes\CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Both
HKLM: Software\Classes\CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: Class; ValueData: %CLASS%
HKLM: Software\Classes\CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: Assembly; ValueData: %NAMESPACE%, Version=%VERSION%, Culture=neutral, PublicKeyToken=%PUBLIC_KEY%
HKLM: Software\Classes\CLSID\{{%GUID%}\InprocServer32; ValueType: string; ValueName: RuntimeVersion; ValueData: v2.0.50727
HKLM: SOFTWARE\Microsoft\Internet Explorer\Toolbar; ValueType: string; ValueName: {{%GUID%}; ValueData: %LONG_NAME%
HKLM: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{{%GUID%}; Flags: uninsdeletekey
HKLM: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{{%GUID%}; ValueType: dword; ValueName: NoExplorer; ValueData: 1</pre>
<p>To not write useless trash to the user&#8217;s computer, the registry changes should only be performed and the files only be copied if the .NET Framework 2.0 (or higher) is installed on the system, because this is needed for the Internet Explorer toolbar as already written above. You can check the availability of the .NET Framework 2.0 quite easy with following Pascal function:</p>
<pre class="brush: pascal; gutter: true">function CheckForDotNet(): Boolean;
begin
    Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727');
end;</pre>
<p>These are the steps to create an Inno Setup installer for both toolbar versions. Of course, you can combine them in a single setup file that installs in Internet Explorer as well as the Firefox version depending on which browser is installed on the system.</p>
<p>The <a title="Developing a Browser Toolbar: Summary (5/5)" href="http://www.ab-weblog.com/en/developing-a-browser-toolbar-summary/">last post</a> will be a short summary.</p>
<h2>Contents of Post Series &#8220;Developing a Browser Toolbar&#8221;:</h2>
<ul>
<li><a title="Developing a Browser Toolbar: Introduction (1/5)" href="http://www.ab-weblog.com/en/developing-a-browser-toolbar-introduction/">Introduction</a></li>
<li><a title="Developing a Browser Toolbar: Mozilla Firefox (2/5)" href="http://www.ab-weblog.com/en/developing-a-browser-toolbar-mozilla-firefox-25/">Mozilla Firefox</a></li>
<li><a title="Developing a Browser Toolbar: Microsoft Internet Explorer (3/5)" href="http://www.ab-weblog.com/en/developing-a-browser-toolbar-microsoft-internet-explorer/">Microsoft Internet Explorer</a></li>
<li>Installation System</li>
<li><a title="Developing a Browser Toolbar: Summary (5/5)" href="http://www.ab-weblog.com/en/developing-a-browser-toolbar-summary/">Summary</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ab-weblog.com/en/developing-a-browser-toolbar-installation-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->