Is there a way, in code, from inside Navision, to determine the path to the fin.exe that is being used? i.e. the application path Thanks Steve
The “Windows Scripting Host”.Shell object has a few functions that may be of help… Example 1: Spelunking the registry:
CREATE(wshShell); FinExePath := wshShell.RegRead( 'HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\fin.exe\'); CLEAR(wshShell); Example 2: Get the apps ‘CurrentDirectory’:
CREATE(wshShell); CurrDir := wshShell.CurrentDirectory; CLEAR(wshShell);
Thank you both of these ideas did just what they are supposed to. I need to refine my problem I have folders like Nav3.7-1 Nav 3.7-2 Nav3.7-3 Each has a fin.exe in it, so I can have multple copies of the client open at the same time. So only one fin.exe is in the registry and the current directory shows what directory I last opened. Is there a way to tell which folder the actual fin.exe I am using is in? Thanks Steve
Each has a fin.exe in it, so I can have multple copies of the client open at the same time.
Originally posted by SPost29 - 2006 Jan 12 : 18:01:00
Uh, do you need 3 folders for that? I can open Navision (3.6) as much as our license allows me. On one pc. With the same username. Or am I missing something?
When you start fin.exe, in effect you are also launching the dlls from server.exe. Server.exe can only ever access one database (locally) at a time, so if you want to open multiple database, then multiple Navision directories is the only way. (Or have multiple servers, but this way is easier).
Hi, Here is no way to find path, except find fin.exe. Or after start Navision find currect path by executing SHELL, it will be in currect path, but it will changes if you change licence, export something to excell file, open txt file for import… So do it before everything else. maybe in CU1. It seems in next version there will be APPLICATIONPATH statement…