OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Detect if VBA is installed (an answer and a question) (http://forum.oberonplace.com/showthread.php?t=11)

reanan 03-12-2002 14:52

Detect if VBA is installed (an answer and a question)
Something to think about

I want to know if someone who installs a script of mine has VBA for CorelDRAW 10 or CorelDRAW 11 installed. If this is so I can install a VBA solution if not I install a CorelSCRIPT solution (second choice because VBA has lot’s more possibilities). What I do now is look for the file “DRAW10VBA.HLP” or “DRAW11VBA.HLP” in the CorelDRAW directory “Programs”. I found out that this is the only file (at least that I could find) that will never be installed when during setup the VBA option is not checked or when someone installs a Try/Buy or an education license.
This seems a little bit unprofessionally to me but I really can’t find where CorelDRAW 10 stores the information that VBA is installed. In CorelDRAW 11 is a setting that shows you that VBA is installed:

VBAProgramFiles = installed

But here is the problem the “EN” part, this stands for the English version of CorelDRAW 11 but what is the key for the Dutch, the French etc. version and how to detect which version is installed?
There is a key which looks to me to be the one:

Language = EN

But is this failsafe?

If anyone has a better way of detecting if VBA for CorelDRAW 10 or CorelDRAW 11 is installed during a setup then post it here!

Alex 04-12-2002 09:41

Re: Detect if VBA is installed (an answer and a question)

Frankly this is not the best approach. VBA is a shared tool and it may be installed if, say, you have Microsoft Office installed, but may not be available to CorelDRAW. VBA comes in several versions which are not compatible among themselves. CorelDRAW 10 ships with VBA 6.2. CorelDRAW 11 comes with VBA 6.3. You cannot interchange the two, so even if you have Draw 10 with VBA installed but Draw 11 without, your macro for Draw 11 will not work and just detecting if VBA is installed will not help.

Personally, I check for a proper APC layer installed. It is different for each version of VBA installed. So, I check if the following registry keys are present:

Draw 10 (VBA 6.2):

Draw 11 (VBA 6.3):

This is also not completely bullet proof, but it is more reliable.

reanan 04-12-2002 13:21


Where do you get this information (rhetorical question)? I will try to implement this in my setups and thanks once again for your fast and useful response!

Alex 04-12-2002 14:35


Originally Posted by reanan
Where do you get this information (rhetorical question)?

Well, RegMon usually helps in these situations. :clever:

All times are GMT -5. The time now is 12:41.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com