Options

Nav Client Path

AntHillMobAntHillMob Member Posts: 79
edited 2011-03-11 in NAV Three Tier
I have an add-in that is quite complex and requires a number of external files. The name of the first is passed to the add-in as a parameter and other files are determined relatative to the path of the first. This may sound unecessarily complex but this is to allow changes to be made without amending the code of the add-in.

All works well if I put the files in a shared directory on the server and store the path to this in a configuration table. This is messy and all clients will need access rights to the shared directory.

The other two ideas I had were to put the files in a directory under the NAV client installation directory. This would work (with the limitation of having to copy the files to each client which is not ideal) but to do this I need to be able to retrieve the Dynamics NAV installation path. APPLICATIONPATH exists but this returns the path to the middle tier installation dircetory which is of no help in the case. So question 1 is is there an equivalent to return the local client installation path?

The other option was to copy the files under a new directory under the service tier directory and use the download function. The problem with this approach is the need to then use an automation object to rename and move the files. This shoudl work but I'm uncomfortable that this may be prone to error.

Any suggestions greatly welcomed.

Answers

  • Options
    IsakssonMiIsakssonMi Member Posts: 77
    You find the path in the registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\fin.exe
  • Options
    deV.chdeV.ch Member Posts: 543
    This is the path of the classic client ..

    RTC is:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Microsoft.Dynamics.Nav.Client.exe

    subkey "Path" gets you the path without the filename
  • Options
    AntHillMobAntHillMob Member Posts: 79
    A little bit of automation with Windows Script Host Shell and that works great.

    Thanks for the suggestion.
Sign In or Register to comment.