Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Program name seems to change..

Hi Team,
D10.3.2 32bit, Win 10, latest LMD controls.
I am using a TLMDIniCtrl.  
Target is set to itRegistry.
IniPrefix is set to ppProgram.
No Regpath set.
RegRoot is set to rpCurrent User.

When the App starts it writes & checks the registry entry.  If the entry isn't there it creates it.  In this case "Computer\HKEY_CURRENT_USER\Software\DBiWorkflow" and writes the various sub-keys/data to it.
Strangely, when the Application exits it creates and writes to a different entry "Computer\HKEY_CURRENT_USER\Software\DBiWorkflow for Windows"
{code}
  //
  DBWReg.WriteString('Session Keys', 'DBiWorkflow', '');
  //
{code}

DBiWorkflow is the Application's file name, 
DBiWorkflow for Windows is the Application's Title in Delphi.

This is either a bug or I have something set wrong.
Can anybody advise please?

Regards & TIA,
Ian
png
png
Screenshot_4.png
15K
png
png
Screenshot_5.png
4K

Comments

  • 2 Comments sorted by Votes Date Added
  • 1. IniPrefix specifies location if inifile in itIniFileMode - does not have any effect in itRegistry mode.
    2. If you don't specify a custom RegPath, the global LMDApplication.GetDefaultRegPath method is used to determine a generated regpath (using LMDApplication.Company, Application.Title and LMDApplication.Version properties).
    If you use method before Application.Title is set, then your scenario can happen (simply check by logging LMDApplication.GetDefaultRegPath located in LMDClass unit).

    Solution:
    a. Set global Application.Title variable before you use TLMDIniCtrl component (or use component not until Application.Title was set internally).
    b. Or simply set  RegPath property in TLMDIniCtrl component instead of using the generated value.

  • Hi Rafael,
    Ahhh.  Tks.  All sorted now.

    Regards,
    Ian
Sign In or Register to comment.