views:

110

answers:

4

I am trying to solve the doc to pdf conversion as described here.

Since there is no a Delphi component (with source code) that creates pdf from doc, I was wondering how it is possible to "register the COM at runtime".

I AM NOT USING AN INSTALLER, I just deploy the exe. So the idea was to simply put the ActiveX dll in the resources and register it at program startup (or the first time I need to use it). Anyway for sure this will give problems in Vista or 7... Can anyone suggest how this can be accomplished?

Keep in mind that I want to keep deployemnt super easy = replace an exe.

COMMENT: Of course If there was a Delphi component for doing this I would have no problem since that functionality would already be there in the exe.

+1  A: 

Usually EXE OLE servers ships with standard command line switch /RegServer - try to start exe with this one

Dewfy
May you explain this better? I am not an expert in this anyway once I used OLE Object to connect with MS Outlook, but in that case Outlook was already there, already installed, I didn't have to install anything.
Just try to start you EXE from cmd with explicit key: OleServer.exe /RegServer
Dewfy
+2  A: 

Vista and later support Non-admin ActiveX control (or per user ActiveX control): http://msdn.microsoft.com/en-us/library/dd433049(VS.85).aspx

ldsandon
A: 

Will you consider a commercial component .. ? If so, the BoxedApp SDK will let you do exactly what you are describing in your question ( and more) , without having to worry about UAC or anything else .. works great with Delphi and .NET.

It comes with a delphi sample on how to run a flash movie by bundling teh flash ocx and registering it at runtime.

http://www.boxedapp.com

good luck

GX
+2  A: 

You can also use Registration Free Com by specifying the dependancy in the exe's manifest. Some links:

http://stackoverflow.com/questions/465882/generate-manifest-files-for-registration-free-com http://msdn.microsoft.com/en-us/magazine/cc188708.aspx

Remko