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 soon123, Today, 12:18 AM
      1 response
      19 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by space_trader, Today, 12:52 AM
      1 response
      20 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by ybhx0315, Yesterday, 09:06 PM
      0 responses
      15 views
      0 likes
      Last Post ybhx0315  
      Started by parkinsonbr, Yesterday, 08:23 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by fxRichard, Today, 04:35 AM
      2 responses
      14 views
      0 likes
      Last Post fxRichard  
      Working...
      X