1
votes

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.

4
Does this MS article help at all? support.microsoft.com/kb/146219Scott W
What's the problem with an installer? There are several good reason to hinder a user without the proper privileges to register a COM server. You can also require your app to be run with elevated privileges - just don't cry then "Windows is not secure!!!"user160694
do you just need to take a document and have a pdf created from it? have you looked at pdfcreator? it works like a printer but it's results are a pdf document that is saved.Leslie
@ldsandon The problem with an installer is that now I just deploy an exe I don't want to be forced to write an isntaller just because I need to add 1 feature.LaBracca
@leslie That is also an idea, I thought about that in the past. I could give the pdf export for doc files to my users by allowing them to configure a pdf printer (so they can use any printer). Then from the application I will print.LaBracca

4 Answers

2
votes

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

2
votes

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

Generate manifest files for registration-free COM http://msdn.microsoft.com/en-us/magazine/cc188708.aspx

1
votes

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

1
votes

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. It works great with Delphi and .NET.

It comes with a Delphi sample on how to run a flash movie by bundling the Flash OCX and registering it at runtime.