L. Vandendriessche
L. Vandendriessche

Reputation: 140

Issues with running program from shared folder

We are currently in the process of developing external utilities with .net 4.0 based on an API supplied to us.

The main program, from where the external utilities are started, is located on a virtual server. So every user starts the program by going to a network folder and launching the .exe.

In the main program there is an option to start the external utilities which are the also launched from a network path.

The external utilities connect to the main program via an api dll. If I'm not mistaken, the dll is an activex component.

All developers have a local installation of the main program. This was needed to create the reference in .Net. If the install wasn't available, a reference could not be bound. For the developers, the tool works.

But for the end-user, which don't have the full install, the tool doesn't work because it goes the registry and looks for some values. These aren't available at and end-user station.

The end-user gets this warning when trying to start

Unable to cast COM object of type 'System.__ComObject' to interface type 'MegaMapp.MegaCurrentEnv'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{33D6C7C0-7D1B-450E-B8A4-8A8611D5B40F}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))

{33D6C7C0-7D1B-450E-B8A4-8A8611D5B40F} is a registry key which isn't available to end-users.

Is there a way to tell the tools they should load the registry keys from the server where the exe resides and not from their local registry?

Upvotes: 0

Views: 210

Answers (2)

jgauffin
jgauffin

Reputation: 101192

ActiveX components will always need registry settings on the client machine.

you could use regsvr32 during application launch to register the DLL before you use it. I'm unsure of if administrator privileges are required.

I would not try to use ActiveX in such environment.

The activex dll is the only way we can communicate with the software. So we built the .net program with the api calls.

Build a server (for instance a WCF service host) which uses the ActiveX component and talk with that server from each client.

Upvotes: 1

Dhwanil Shah
Dhwanil Shah

Reputation: 1082

If the external utility is an ActiveX EXE, then you can register it on end-user's machines using the standard regsvr32 utility. It needs to be done for the first time only.

Upvotes: 0

Related Questions