Hi Ash,

The easiest (and correct?) way to determine whether a certain application is installed 
is to query the registry.

E.g. "if professional installed" would be something like
    If RegistryKeyExist("HKEY_LOCAL_MACHINE\Software\MapInfo\MapInfo\Professional\") 
Then

A similar approach applies for the runtime, although I don't know the exact key since 
I've never had it installed.

You just need to look up the correct registry finction in VB.

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/
http://hjem.get2net.dk/lars-online/
WGS84: 10.20'40"E 55.20'20"N
----- Original Message ----- 
From: "Simmonds, Ashley (PTB)" <[EMAIL PROTECTED]>
To: "'Mapinfo List (E-mail)'" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 3:00 AM
Subject: MI-L Pro/Runtime Integrated Startup


> heya peeps,
>  
> any quick code snippets for determining on a user's machine what version, if
> any, of mapinfo is installed, and running appropriately.
>  
> i'm pretty sure it's simple enough, but is it usually done by causing errors
> and acting upon them, or just querying the system?
>  
> i think the simplest would be something like:
>  
>     if professional installed
>         createobject(blah)
>     elseif runtime installed
>         createobject (blah)
>     else
>         msgbox "Map interface is not available at this terminal"
>     end if
>  
> i'd rather do it like that than causing a series of errors:
>  
>     createobject (mapinfo stuff)
>         if error then
>             createobject( runtime stuff)
>                 if error then 
>                     msgbox "you can't do that and stuff"
>  
>  
> i'd just like to return a boolean value of what's available, then act upon
> that.
>  
> (i also remember something about RunTime not being instantiated unless
> through calling an MBX, is this also true for integrated mapping?)
>  
> gramercy,
>  
> ash.
> 
> 


--------------------------------------------------------------------------------


> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Message number: 4688

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4689

Reply via email to