Locating the Connect executable in registry

Hi,

What is best (Bentley supported) way to locate the Microstation Executable in the Windows Registry?

With SelectSeries 10 we used the following: [HKEY_LOCAL_MACHINE;SOFTWARE\Wow6432Node\Bentley\MicroStation\08.11.09;PathName]

Considering the fact that a user can have mutiple/different  CONNECT versions, what would be the best way?

Thanks in advance for answering.

Parents
  • Thanks for clarifying that it is not possible to have multiple versions of CONNECT. (I wasn't able to try that out yet)

    And when you build an application for multiple users and every user could have a different CONNECT-version, the same procedure would still apply?

    Or would I need to specify a minimal version?

  • Granted there are many complexities and use case needs that no single/simple one solution fits all, but for reference and sharing...

    As part of the MicroStation CONNECT SDK developer shell initialization (SDKCommonEnv.bat+77) I generically locate the highest MicroStation CONNECT Edition product version installed and proceed to extract and provide the related product Workspaces location to the SDK via SDKPRODWORKSPACES variable.

    :SetProductEnv :: SDK Parent Product Environment
    for /f "tokens=*" %%a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\Installed_Products\* | Where {$_.ProductName.Equals("""MicroStation""") } | Sort-Object Version | select ConfigurationPath | select -last 1 | ft -HideTableHeaders" -AutoSize') do set SDKPRODWORKSPACES=%%~saWorkspaces\
    set SDKASSEMBLIES=%SDKPROD%Assemblies\
    set SDKOUTDIR=%SDKPROD%Mdlapps\
    set SDKPRODDLLS=%SDKPROD%
    goto :eof

    Again, versions, bitness, COM (last registered) all require their own discovery and solutions, but if you only care about "installed products" as being the requirement, hopefully the above method may be of some help.

    HTH,
    Bob



Reply
  • Granted there are many complexities and use case needs that no single/simple one solution fits all, but for reference and sharing...

    As part of the MicroStation CONNECT SDK developer shell initialization (SDKCommonEnv.bat+77) I generically locate the highest MicroStation CONNECT Edition product version installed and proceed to extract and provide the related product Workspaces location to the SDK via SDKPRODWORKSPACES variable.

    :SetProductEnv :: SDK Parent Product Environment
    for /f "tokens=*" %%a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\Installed_Products\* | Where {$_.ProductName.Equals("""MicroStation""") } | Sort-Object Version | select ConfigurationPath | select -last 1 | ft -HideTableHeaders" -AutoSize') do set SDKPRODWORKSPACES=%%~saWorkspaces\
    set SDKASSEMBLIES=%SDKPROD%Assemblies\
    set SDKOUTDIR=%SDKPROD%Mdlapps\
    set SDKPRODDLLS=%SDKPROD%
    goto :eof

    Again, versions, bitness, COM (last registered) all require their own discovery and solutions, but if you only care about "installed products" as being the requirement, hopefully the above method may be of some help.

    HTH,
    Bob



Children
No Data