|
ActiveXPowUpload 1.2
Installation, upgrade, etc |
Home
page Contact
support
|
ActiveXPowUpload installs itself automatically when you first time visit a page containing the ActiveX object. (What should contain a page to install ActiveX automatically? See here.) The installation procedure is the same as with any other ActiveX object. For example, you opened http://www.element-it.com/Examples/ActiveXPowUpload/SimpleUpload.html. Here are the steps you go through in order to install ActiveXPowUpload.
Information Bar appears at the top of the page. Click "Install ActiveX control..." in the pop up menu of Information Bar.
Click "Continue" to proceed.
Make sure the publisher is Element-IT Ltd.
On 64-bit Windows you need to install ActiveXPowUpload in both 32- and 64-bit Internet Explorer separatly. That is open the web page with ActiveXPowUpload in Internet Explorer 32-bit first and install the control then do the same with Internet Explorer 64-bit. Of course, if you only work with one version of Internet Explorer you may install ActiveXPowUpload only once.
You can install ActiveXPowUpload manually, though it is not recomended. This is how.
The following steps are optional, without them ActiveXPowUpload will work anyway, but maybe with reduced functionality.
ActiveXPowUpload uses GDI+ library (when it is available) to display images. The control can display images without GDI+, but in this case the range of supported formats is more limitted.
GDI+ library is included in Windows XP and above. You do not need to do anything if you use only these operation systems. It does not included in Windows 2000, but may be installed manually.
To install GDI+ in Windows 2000, download GDI+ distribution from Microsoft Download Center, for example, Platform SDK Redistributable: GDI+. Follow installation instructions. You need Gdiplus.dll library to be somewhere in the search path. Put it into C:\Windows\system32 or C:\WINNT\system32.
From time to time new versions of ActiveXPowUpload are released. You can perform manual updating or set up your html code to perform updating automatically.
If you have an ActiveXPowUpload cab file and want to install that exact version of the control, you may proceed with the following simple steps:
<HTML> <body> <OBJECT codebase="ActiveXPowUpload.cab" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B"> </OBJECT> </body> </HTML>
Upgrade procedure depends on the Windows version.
Update command checks for a new version of the component at the locations from where it was installed the first time. To remember where that place is examine the CodeBase property. This property and much more reside on an ActiveXPowUpload Class Properties window. Click "Properties" in the pop-up menu to open it.
If CodeBase does not point to place where new version resides, you other move destribution to a corect place or deinstall ActiveXPowUpload and install it again with a different code base.
To set up automatic updating you should specify a codebase attribute of the object tag. That attribute must contain the URL referring to ActiveXPowUpload cab file with version number appended. For example, "http://www.activexpowupload.com/ActiveXPowUpload.cab#Version=1,0,1,0". A component version number is represented as four non-negative integers separated by commas. These numbers specify the minimum component version required. When Internet Explorer encounters an object tag, it checks the version of the installed control. If the installed version is older than the one required, then IE upgrades the control to a higher version. If no version of the component is installed on the user's computer, the component is downloaded and installed.
The version number may have a special value "-1,-1,-1,-1". For example, "http://www.activexpowupload.com/ActiveXPowUpload.cab#Version=-1,-1,-1,-1". This value instructs Internet Explorer to download and install the latest version of a component. If the component is not installed on the client computer, Internet Explorer downloads and installs the component. If the component is installed on the client computer, Internet Explorer downloads the component if the release date is later than the installation date on the client computer. If the component is installed on the client computer and the release date is the same or earlier than the installation date, only an HTTP header transaction occurs. If the client computer has a newer version installed, no download occurs.
See CODEBASE Attribute and Managing Versions of a Component for more details.
There are two versions of the control: 32- and 64-bit for Internet Explorer 32- and 64-bit respectively. You need to set the codebase attribute dynamicaly to handle the both cases. See Putting ActiveX on a web page for example.
On 64-bit Windows there are two versions of Windows Explorers: 32- and 64-bit. Windows Explorer 32-bit can remove only 32-bit version of the control, while Windows Explorer 64-bit can remove only 64-bit version of the control. You need to use the appropriate version of Windows Explorer in the steps below. If you need to remove both versions of the control, repeat the steps for each version of Windows Explorer.
By default Windows 64-bit use Windows Explorer 64-bit. To invoke the 32-bit version you need to do the following:
To make sure the process is really 32-bit you may do the folowing.
Removing the control
On 64-bit Windows there are two Internet Explorers: 32- and 64-bit. IE 32-bit can remove only 32-bit version of the control, while IE 64-bit can remove only 64-bit version of the control. You need to use the appropriate version of Internet Explorer in the steps below. If you need to remove both versions of the control, repeat the steps for each version of Internet Explorer.
How to determine the version of ActiveXPowUpload installed.
Starting from version 1.0.1 ActiveXPowUpload supports a Version property. It returns ActiveXPowUpload version as a string.
To put ActiveXPowUpload on a web page use an object tag. The minimal code looks like:
<OBJECT CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B"> </OBJECT>
The CLASSID attribute is required. It specifies what control you want to use. Everything else is optional.
Some other useful attributes:
ActiveXPowUpload is distributed in cab archives. There are two versions 32- and 64-bit. 32- and 64-bit versions of the control are used with Internet Explorer 32- and 64-bit respectively. Cab archives are usually named ActiveXPowUpload-x86.cab (for 32-bit version) and ActiveXPowUpload-x64.cab (for 64-bit version). If the codebase attribute is set to a correct value, and the ActiveX component is not installed, Internet Explorer installs the component automatically when you visit that page. The installation process is described here. The codebase attribute is also useful for updating the component.
Here is another example:
<OBJECT width="600" height="300" id="ActiveXPowUpload" codebase="http://www.activexpowupload.com/download/activexpowupload.cab" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B"> </OBJECT>
This code has one problem related to codebase attribute: you need to know the version of the control you need in advance. So installation and updating will not work with both versions of Internet Explorer. For example, if you point codebase to a 32-bit version of ActiveXPowUpload, installation and upgrading will work with 32-bit Internet Explorer, but will fail with 64-bit Internet Explorer. To handle both cases you need to generate the codebase property dynamically. You can do that either on client or on server. Here is client code that uses JScript to detect Internet Explorer type. You need to generate the complete object tag dynamically.
<script language="jscript">
document.write("<OBJECT width='600' height='300' id='ActiveXPowUpload' "
+ "CLASSID='CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B' ");
if(navigator.cpuClass.toLowerCase() == "x64") {
document.write("codebase='ActiveXPowUpload-x64.cab'>\n");
} else {
document.write("codebase='ActiveXPowUpload-x86.cab'>\n");
}
document.write("<param name='UploadURL' value='http://hostname/path/to/upload/script.aspx' />\n");
document.write("<param name='EnablePopupMenu' value='false' />\n");
<!-- other parameters -->
document.write("</OBJECT>\n");
</script>
You can set the codebase attribute on server. You can detect Internet Explorer architecture inspecting the user-agent http header. For 32-bit Internet Explorer it looks like "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1)", for 64-bit Internet Explorer it is "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; x64; SV1)". Notice the x64; substring in the 64-bit version. If it presents, it is 64-bit Internet Explorer, otherwise it is 32-bit Internet Explorer. In ASP.NET you may write the following code.
<%@ Page Language="C#" ... %>
<!-- ... -->
<script runat="server">
enum IE_Architecture { x86, x64 };
IE_Architecture InternetExplorerArchitecture()
{
/* Example of user agent string:
* Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; x64; SV1; .NET CLR 2.0.50727) */
string user_agent = Request.UserAgent;
int begin_ind = user_agent.IndexOf('(');
int end_ind = user_agent.LastIndexOf(')');
if (begin_ind < 0 || end_ind < 0)
return IE_Architecture.x86;
string IE_prop_str = user_agent.Substring(begin_ind + 1, end_ind - begin_ind - 1);
string[] IE_prop_arr = IE_prop_str.Split(new Char[] { ';' });
foreach (string prop in IE_prop_arr)
{
if (prop.Trim().ToLower() == "x64")
return IE_Architecture.x64;
}
return IE_Architecture.x86;
}
string ActiveXPowUploadCodebase()
{
if (InternetExplorerArchitecture() == IE_Architecture.x64)
return "ActiveXPowUpload-x64.cab";
else
return "ActiveXPowUpload-x86.cab";
}
</script>
<!-- ... -->
<object height="300" width="600" id="ActiveXPowUpload"
codebase="<% = ActiveXPowUploadCodebase() %>"
classid="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B">
<param name="UploadURL" value="http://hostname/path/to/upload/script.aspx" />
<param name="SerialKey" value="" />
<!-- other parameters -->
</object>
ActiveXPowUpload is distributed in the form of .cab file archive. It contains a single dll library named ActiveXPowUpload-x86.dll or ActiveXPowUpload-x64.dll. If Internet Explorer installed ActiveX as described in the Installation section of this manual, the dll is placed in the "C:\WINDOWS\Downloaded Program Files\" or "C:\WINNT\Downloaded Program Files\" directory.[1] It's also possible to install ActiveXPowUpload with the help of regsvr32.exe utility. In this case, dll is registred at the place you want. Sometimes it's hard to remember where that dll resides. Windows registry may help. Open Registry Editor and move to "HKEY_CLASSES_ROOT\CLSID\{FB98CEED-9DE1-4517-B30C-CDA19C6D150B}\InprocServer32". The default value contains a full path to the ActiveXPowUpload.dll. If you can't find this key, ActiveXPowUpload is not installed or your registry is damaged. Reinstall ActiveXPowUpload.
On 64-bit Windows there are two versions of Registry Editor: 32- and 64-bit. The 32-bit Registry Editor shows information about 32-bit controls, while 64-bit Registry Editor shows information about 64-bit controls. "C:\WINDOWS\regedit.exe" is the 64-bit Registry Editor, "C:\WINDOWS\SysWOW64\regedit.exe" is the 32-bit Registry Editor.
To install ActiveXPowUpload control and to work with it Internet Explorer must be configured properly. Most of the time default settings are acceptable but if you encouter problems it's worth to check them.
Open Tools menu, click Internet options. An Internet options dialog will pop up. Go to the security tab.
Select the web zone you want to configure, most probably it is "Internet". Push the "Custom level" button. Scroll to the "ActiveX controls and plug-ins" section of the list.
Check that the following options are configured properly.
ActiveXPowUpload has two versions 32- and 64-bit. There are destined for Internet Explorer 32- and 64-bit respectively. On 32-bit Windows you need only 32-bit version of the control. On 64-bit Windows you typically need both.
The 32-bit version of the control is distributed in ActiveXPowUpload-x86.cab file. Here x86 stands for x86 processor architecture. The 64-bit version of the control is distributed in ActiveXPowUpload-x64.cab file. Here x64 stands for x86-64 processor architecture often shortened to x64.
Both version are functionally identically. They have all the same properties, methods and so on. You do not have to do any changes in code to use either 32- or 64-bit version.
[1] It's assumed that Windows is installed on the drive "C", otherwise change the drive letter appropriately. "Downloaded Program Files" is a hidden folder, to see it Internet Explorer must be configured to show hidden files and folders.