Hi all i am having a problem getting the systemdrive from a codeunit in Navision. I need this because Navision is installed on several terminal servers and the serves are set up with differend systemfolders. Some are M:, and others are C: How can i get the systemdrive (%systemdrive%) in a codeunit in Navision.?? Did try the shell command without any luck Help please Lars
As found in the online help: ENVIRON Use this function to return a string associated with an environment variable. String := ENVIRON(Name) String Data type: text constant or code The string associated with the environment variable. Name Data type: text constant or code The name of the environment variable. Comments If the environment variable does not exist, the string that is returned may contain garbage.
Code example: MESSAGE(ENVIRON('SystemRoot'));
My hero!! Thank you. I have been searching for all other keyword but missed this one. Lars