Link to home
Start Free TrialLog in
Avatar of vlad_oz
vlad_oz

asked on

deploying an activex control (.cab file) from a jsp page

Hi Experts!

This is a tricky one!
Here is some background: I've got a custom made Java webapp which is using Crystal Reports for its reporting functionality. The webapp is communicating with the Crystal RAS (reports application server) via an API. Everything works fine until the users would want to print a report from the DHTML report viewer. In order to print an ActiveX control (Print Control) needs to be installed on the client machine. The control is provided in a cab file (the file is provided by Business Objects, makers of Crystal Reports) and is signed, versioned etc. The control is supposed to be downloaded and installed automatically when the user tries to print for the first time. When we've tested the functionality all tested absolutely fine.

Now, it the "real world" the following occurs:
The PrintControl doesn't install on some user machines, doesn't even prompt to install, the page just hangs. We realised that this could be due to the user privileges on the computers they're using. We have a rather large network of client computers accessing the application (3000+) so, to make our lives (IT department) easier the users are not typically given Administrators or even Power User access under their normal logins.

We've tried to log into the troubled computers remotely using a local admin account. Then logging into the site and try to print the reports, the PrintControl would then install and allow us to print. Our assumption was that once the PrintCotrol had been installed, it will run under any logins to this machine. But when the users would log in using their normal logins the PrintControl would stop working again.

Now, we can't give all our users Power User access to the computers. So, the question is: is it possible to install an ActiveX control bypassing windows permissions? Of course we'd prefer this to be done via a webpage, but it will be ok for us to send them a CD with some sort of an exe on it to run under their account.

Many thanks in advance!

P.S. I can email the actual cab file if it helps.
Avatar of fatalXception
fatalXception

Rather than breaking the security features, you could just copy the OCX file to the machines locally

then from an admin login cmd prompt:
regsvr32 -u [path to ocx file]
regsvr32 [path to ocx file]

which should work. I had the exact same problem with an AX control in our organisation, and that proved to be the fastest way to get it up and running.

You could even script the entire operation for deployment over a large network/
Avatar of vlad_oz

ASKER

thanks for the reply!

there are no OCX files in the CAB, only a couple of DLLs, an INF and an EXE (called dependancy installer, not sure what exactly that does)
I suppose DLLs can be registered from the command line as you've specified above. Does that matter which directory on the client computer they're copied to?
Avatar of vlad_oz

ASKER

should the DLLs go into different directories in different versions of Windows? We've got 2000 and XP Professional on most of our client machines
ASKER CERTIFIED SOLUTION
Avatar of fatalXception
fatalXception

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vlad_oz

ASKER

Thanks fatalXception!
I'll test your suggestions and let you know the results in the next couple of days.
Avatar of vlad_oz

ASKER

manually registering the DLL files worked fine, however to run the regsrv32 command you still need to be logged in as an adiministrator or a power user, as I've menioned previously, most of our users have very limited access to their PCs, in some cases they can't even copy a file into a directory that will be in the Path. Apparently Windows XP allows to script batches that will log in under a different account (ie, admin) do what they need to do and then log out, but sadly Windows 2000 doesn't seem to have that capability. So, basically we're back to square one.. 8-|

anyway, thanks for your assistance!
Bummer. But all is not lost, the runas command is normally not scritable because the pwd has to be entered interactively.

But, see this page:
http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/AdminTips/Miscellaneous/RunprogramsasanotheruserinWindows2000WindowsXP.html
to get a tool that will allow you to script runas. It's not 100% secure but it should work for most cases as long as you remember to put the password file on a network share and not the user's machine ;)