mGinger

Tuesday, February 2, 2010

Downloding and installation of active x control on computer without internet.

When we create a website, and the website uses any active X control, which is not installed on client machine. Then whenever user open the site, it automatically download and install control from the site. Most popular example is dowloading of Crystal report Active X print control. This control is required to show print dialog for crystal report on client side. As Microsoft's site says that this control is not provided by them due to some security concerns, so this control have to be downloaded from outer world.
Everything works fine when client have proper internet connectivity. But when it comes to intranet, where internet is not available then it becomes a tough job.
So in this case I just learned a lession when I got stucked into this issue.
My situation was: I developed a website on developer machine (as everybody do), that developer machine have everything installed on it with proper internet connectivity. My website had a few pages which were showing some crystal reports and user was suppose to print them. When I first time run this web-page on my developer machine it downloaded a component, which i didn't notice. Then everything worked fine.
But I deployed it on server and went to client machine to give control to client. It shown the crystal report, when it came to print the report no dialog appeared. I asked the client about internet connectivity. He said no internet, then it became suddenly hard for me to get things done, as I was a new developer.
So I just did following steps:
I searched the computer on which that control was already installed. Then I reached to 'Downloaded Program files' folder in 'C:/Windows' directory.
There I found the download control like 'Crystal Print Control 10.5', I right-clicked the control file to get its properties.
In the properties dialog I reached to general tab (actiually it is the default tab). There I looked for 'Code base' value. It is by default written at the end of the tab. It should be internet path of the file from where the control was downloaded.
I copied the path and pasted it into Internet explorer after pressing enter it started downloading the CAB file.
After downloading the CAB file, I opened the file using and unzipper program. Then there was a bunch of DLL files.
Then I copied all files and took them to client computer, where internet connection was not available.
As all of the DLL files were COM dlls, so I registered them on client machine using following command: 'regsvr32 '
Then there was a message about successful registration of DLL into the system. I tested the system and it worked fine.

Moral of the story:
If client machine do not have internet connectivity to download and install Active X control by itself. Then dont panic, just go to the machine where it is already installed and found working. Path where to go to is mentioned in the story.
download fresh CAB package. Unpack the package and find some DLLs.
Downloaded DLL are COM dlls (i have good experience over COM/DCOM).
Copy the DLLs into the client machine and register them using the command mentioned in the story. Then test the system it should work fine.

ALL the BEST... ;-)