MERGEINI - What is it and how to use it

Version 5

    Verified Product Versions

    Endpoint Manager 9.5Endpoint Manager 9.6Endpoint Manager 2016.x


    I - Introduction

    This article will provide information about & an example of using MERGEINI to customise agent configurations.


    The basic information on the use of MERGEINI can be found in this document - DOC-8412 - but this is a more focussed version, with a full walkthrough and screenshots for added comfort.


    II - What *IS* MERGEINI?

    Historically (LANDesk Management Suite 9.0 and older), the only way to customise anything in the agent configuration was to edit the agent-configuration files directly in some fashion.


    Whether it was the .INI file for the agent itself (which would risk being overwritten if any sort of change would occur), or even the agent-template files themselves (which would be overwritten during any service-pack / major-version upgrade), the net effect was frequently the same - frustration for the administrator(s) as his/their changes would be lost for one reason or another.


    This could be aggravated in certain Murphy's Law-esque situations where an accidental change to the agent configuration caused a re-set of the agent configuration files -- often before a crucial roll-out, and causing unnecessary headaches & clean-up work as a result.


    The "MERGEINI" functionality is a in-the-box solution to this exact problem. The ability to create your own changes, in your own files, which will then be added to all agent configurations & will not risk being overwritten during an application update of some sort.


    So if you want/need to incorporate custom files of your own that you want/need to push out with the LANDesk agent, this is the easiest way to do so.


    III - Overview Of Agent-configuration Files

    To provide context around the filenames used here, an overview of what files are involved around agent-configuration should be useful.


    All of the files below exist in either of the following directories

    • C:\Program Files\LANDesk\ManagementSuite\

    - or -

    • C:\Program Files\LANDesk\ManagementSuite\ldlogon\



    This file exists in the Core's LDLOGON directory.


    This file is the "very base" of all agent configuration files. It doesn't hold any specific value, but only token place holders - such as "%coreserver%".


    These placeholder tokens then get replaced with actual values (so "%coreserver%" would become "MyCore.MyCompany.Com" for instance) when STAMPER.EXE runs. The outcome of this process is then the NTSTACFG.INI


    This file should NOT be edited without serious consideration. This file should be expected to be updated as part of every service pack and/or major product update.


    MERGEINI will add custom entries into the NTSTACFG.IN# -- the ensuing run of STAMPER.EXE will then produce a NTSTACFG.INI which reflects those updates.



    This file exists in the Core's LDLOGON directory.


    As indicated in the previous point, this is the "base template - with filled out values relevant to your Core" (such as its name). This is the actual file that serves as the template for any agent configurations you create.


    III.C - The "Your-Agent-Configuration-Name-Here".INI

    This file exists in the Core's LDLOGON directory and is named based on your agent configuration.


    So if you have an agent configuration called "My Test Agent" then you will find a "My Test Agent.ini" in the LDLOGON directory.


    If you need to create a change for "just this one agent configuration" for some reason, you *CAN* write-protect the file by making it "read-only" on an NTFS file level.It's a crude, but functional way to ensure that your changes don't get undone.


    Remember that you'll need to un-protect the file if you do desire to write out actual changes again though!



    This file exists in the Core's ManagementSuite directory.


    This binary's job is to populate the various tokens in the NTSTACFG.IN# with relevant value - so putting in your configured Core Server name / IP / FQDN into the relevant placeholders.


    You shouldn't run STAMPER.EXE manually. It's often easiest just to re-start the "LANDesk Inventory Server" service on the Core, as one of the jobs it does as part of its start-up routine is re-running the stamper.


    IV - Complete Example Walkthrough  Using MERGEINI

    Here's a "nose to tail" walkthrough of using MERGEINI to


    IV.A  - Step 1 - Create your customised INI-file.

    For the purposes of this example, let's call it "MyCustom.ini" and save it in the LDLOGON directory on the core (by default -- "C:\Program Files\LANDesk\ManagementSuite\ldlogon\").

    1 - LDLOGON and my files.jpg



    IV.B - Step 2 - Add / edit the contents of your customised INI file.

    For the sake of this example, let's include a logo bitmap in the CBA post copy actions.

    2 - CustomIni_Contents.jpg


    So the contents would be:

    [Common Base Agent Post Copy]

    FILE25000=MyBitmap.bmp, MyBitmap.bmp, NOCOPYERROR


    IV.C - Step 3 - Pointing to the created INI-file:

    Now, launch regedit (on the Core) and go to:



    NOTE: Chances are the "Files" key does not exist, so you'll need to create it. It isn't there by default.


    IV.D - Step 4 - Creating the registry entry/entries:

    Create a STRING entry (name it whatever you want), and as the value, point it to the full path of your customised INI-file.


    Because the odds are that you'll be dealing with spaces somewhere along the line, it'd be a good idea to use quotes on either end. So in this example we have:

    ==> a STRING called "MyCustomIni" (though the name can  be anything you want it to be)


    And the String value would be as follows:

    "C:\Program Files\LANDesk\ManagementSuite\ldlogon\MyCustom.ini"

    3 - Registry Details.jpg


    Note that you do not *HAVE* to store your customised changes in the LDLOGON directory. It tends to make things easier having everything in one place though.


    IV.E - Restart the inventory service on the Core

    The purpose here is so that upon the restart, the inventory service re-runs STAMPER.EXE.


    Your intended changes will be appended to the relevant section(s) that you've chosen.


    NOTE: If you open the "NTSTACFG.IN#" file in the LDLOGON directory, you should see your relevant entry updates. So in my case, we have:


    [Common Base Agent Post Copy]

    (XP, VISTA)EXEC900=%DEST%\fwregister.exe, "LANDesk Ping Discovery Service" "%SYSTEM%\cba\pds.exe", NOWINDOW

    (XP, VISTA)EXEC901=%DEST%\fwregister.exe, "LANDesk Message Service" "%SYSTEM%\msgsys.exe", NOWINDOW

    (... skipping regular stuff as it's not really relevant here...)

    EXEC20000=sc.exe, failure CBA8 reset= 86400 actions= restart/5000, NOWINDOW

    FILE25000=MyBitmap.bmp, MyBitmap.bmp, NOCOPYERROR



    The NTSTACFG.IN# and .INI files are the template files, upon which all agent configuration files are then built upon. It's important that you have those entries here.


    Here's the relevant NTSTACFG.IN# for our working example (I had to cut out some content due to excessive size of the screenshot otherwise):

    4 - NTSTACFG Example.jpg


    IV.F - (Re-)create / (Re-)build your agent configuration.

    (Re-)create / (Re-)build your agent configuration (or create a new one). Or use the "Rebuild all" button.


    This should then include your relevant entry/entries to your agent configuration INI-file.


    If you start including files, be aware that those will be hauled into the single-file executable as well.


    So be mindful of those 500+ MB files ... this is meant to help you with customising a few part around the agent - it shouldn't be used to solve problems where "full on" software distribution tech via packages & so on is better suited.


    V - Troubleshooting & Gotchas

    This section covers likely gotchas and otherwise information around troubleshooting.


    Note that there isn't really much to go wrong here by and large. Most common pitfalls should be usually around file-level or registry-level permissions.


    V.A - Where do I find the syntax for agent configuration items?

    In any agent-config / NTSTACFG file (it's a big section in the beginning)


    You can do all manner of things - from copying down additional files, to executing them. Work from existing examples in the configuration file(s) if you're getting started.


    V.B - Potential pitfalls around the numerals!

    The line item NUMERAL (so "25000" in the "FILE25000" example) is something that *MUST* be a unique value.


    The numerals do *NOT* have to be sequential. So you could have "55000" followed by a "60000" just fine.


    Because of the required uniqueness, it is recommend to start high (say - 50000) and go from there. Better to err on the side of caution.


    V.C - Writing into the correct registry location

    Be aware that LANDesk Management Suite 9.5 was still running as a 32-bit app on a 64-bit OS, so it's registry location would've been pointing to:



    From LANDesk Management Suite 9.6 and onwards, the Management Suite is running as a native 64-bit application, and thus uses the 64-bit registry path:





    VI - Conclusion

    This article should provide conclusive information on how the MERGEINI functionality can be used to automatically add custom agent configuration items to your agent INI-files.