Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to find the NT installation folder programatically?

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

    How to find the NT installation folder programatically?

    How can I find the NT installation folder using NinjaScript? I am trying to avoid hard-coding something like C:\Program Files\NinjaTrader 6.5. Thanks!
    Last edited by ooppie; 05-22-2008, 05:23 PM. Reason: Typo

    #2
    Environment.CurrentDirectory will give you the installation folder. If you have NT 6.5 installed at the default location, it returns
    C:\Program Files\NinjaTrader 6.5\bin
    . You can remove "bin" and use what is remained.

    Comment


      #3
      Here is a single line of code that gives you the NT installtion folder:

      Directory.GetParent(Environment.CurrentDirectory). FullName

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by jonfan45, Today, 06:06 PM
      0 responses
      8 views
      0 likes
      Last Post jonfan45  
      Started by rustyspring, Today, 05:15 PM
      0 responses
      9 views
      0 likes
      Last Post rustyspring  
      Started by xulu13, Today, 05:01 PM
      0 responses
      12 views
      0 likes
      Last Post xulu13
      by xulu13
       
      Started by Pbarrionuevo, Today, 04:30 PM
      0 responses
      9 views
      0 likes
      Last Post Pbarrionuevo  
      Started by vantojo, Today, 01:39 PM
      0 responses
      20 views
      0 likes
      Last Post vantojo
      by vantojo
       
      Working...
      X