Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Mutex name of Ninjatrader Application.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mutex name of Ninjatrader Application.

    Hi,

    I need to know the mutex name of Ninjatrader application to specify on the installer code of indicator. I'm using Inno setup script to prepare the installer.

    I need to specify the mutex name to prevent the user from installing indicator or new versions of inducator while Ninjatarder is running.

    Please help.

    Regards,

    Pooja Krishna.

    #2
    Pooja Krishna, welcome to our forums - unfortunately we would not know what that is exactly, could you perhaps clarify your request for us?

    Thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      Thanks. I'm using Inno script to create the Installer for a NinjaTrader indicator as it has a custom DLL to manage license.

      I want to ask user to exit NinjaTrader before installing or uninstalling the Indicator, the straight forward way to do so in inno script is to specify the mutex name of the application. I have work arounds here, if NinjaTrader has no Mutex name.

      Plesae see the following link describing mutex usage with Inno script:

      Comment


        #4
        Thanks for clarifying, unfortunately we would not know - would the PID in this context help you also?

        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks for the support.

          I will check the existance with the PID or Window name with class.

          Comment


            #6
            Checking existance with window class

            I have used the following code to find the existance of NinjaTrader in my Inno script.

            function NextButtonClick(CurPageID: Integer): Boolean;
            var
            NTWin: HWND;
            begin
            NTWin:= FindWindowByClassName('WindowsForms10.Window.8.app .0.378734a');
            if NTWin<> 0 then
            begin
            Msgbox('The installer has detected that Ninjatrader is currently running.'+#13+'Please close all instances of NinjaTrader now, then click Next to continue, or Cancel to exit the Installer." ', mbError, MB_OK);
            Result := FALSE;
            end;
            end;

            Comment


              #7
              Great, thanks for posting your solution here!
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by chbruno, Today, 04:10 PM
              0 responses
              1 view
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              436 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              5 views
              0 likes
              Last Post FAQtrader  
              Started by rocketman7, Today, 09:41 AM
              5 responses
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by frslvr, 04-11-2024, 07:26 AM
              9 responses
              127 views
              1 like
              Last Post caryc123  
              Working...
              X