How To: Automate the Brokerconfig.exe Process for End Users Outside the Network

Version 5

    One of the challenges for machines outside the network is making sure that they have a valid Management Gateway certificate.  To do so manually can be a challenge, and introduces the user to having to put in a username and password.


    This AutoIT script solves that problem.  Embedded in the script is the username and pasword for the Management Gateway.


    Additionally, for machines that will always be in gateway mode there is an updated registry entry for the Remote Control service that will place the service in an automatic "retry" mode which will continously connect the machine with the gateway.


    To download and install the AutoIT program, go here:



    Here is the AutoIT script.  This will need to be opened with the ScITE Script Editor and modified with the desired username and password.


    After editing the script, choose the Build option to create an EXE file that can be copied out to the clients.


    #cs ----------------------------------------------------------------------------
     AutoIt Version:
     Author:         myName
     Script Function:
        Template AutoIt script.
    #ce ----------------------------------------------------------------------------
    ;This section launches BrokerConfig.exe and retrieves the gateway certificate
    Run ("c:\program files\landesk\ldclient\brokerconfig.exe")
    WinWaitActive("LANDesk Management Gateway")
    ControlSend ( "LANDesk Management Gateway", "", 1008, "[Your UserName]" )
    ControlSend ( "LANDesk Management Gateway", "", 1009, "[Your Password]" )
    ControlClick ( "LANDesk Management Gateway", "Send", 1002)
    ;The Sleep command is necessary because it takes a little time to retrieve the certificate.  This value is in miliseconds, and can be adjusted based on how ;quickly your gateway responds with the certificate.  The default value here is 40 seconds.
    Sleep ( 40000)
    ControlClick("LANDesk Management Gateway", "", "[ID:2]")
    WinClose("LANDesk Management Gateway")
    ;This section updates the Remote Control Service registry value to make the machine a permanent gateway client
    ;NOTE - Only do this if the machine will not be on the same network as the core and will be a permanent gateway client
    RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ISSUSER", "ImagePath", "REG_EXPAND_SZ", "C:\PROGRA~1\LANDesk\LDClient\issuser.exe /b /l[your gateway name or IP] /SERVICE")
    ;These 3 lines stop and start the LANDesk Remote Control service with an 8 second delay 
    RunWait (@ComSpec & " /c " & "net stop ISSUSER","", @SW_HIDE)
    Sleep ( 8000)
    RunWait (@ComSpec & " /c " & "net start ISSUSER","", @SW_HIDE)
    ;This last line adds a popup box that can be removed if desired.  The message box will disappear after 10 seconds
    MsgBox(10096, "[Your Company Name]", "[Your Company's Name] IT Team thanks you for installing this software.  Have a great day!", 10)



    NOTE:  When putting in the user account information LANDesk recommends for security reasons creating a local account on the core server with no file system rights or resource rights.  All that is necessary is that the user be a member of the LANDesk Management Suite group.