Hello everyone!
It is not a secret that some operation system functions are not supported in RTC.
Does anybody have an idea how can I get values of SYSTEMDRIVE, COMPUTERNAME, TEMP,TMP ... and/or other system variables?
In the classic client I can use the ENVIRON function, but this function is not supported in the RoleTailored client.
For example:
In the Classic client ENVIRON('TEMP') will return me the path to the temporary system folder.
In th RTC the similar path will be after using CREATETMPFILE func and getting the path of a created file.
Or If the temporary place is not critical for solution – the TEMPORARYPATH function can be used.
But it is only one alternative.
What about analogs to
ENVIRON('SYSTEMDRIVE')
ENVIRON('COMPUTERNAME')
ENVIRON('SYSTEMROOT')
ENVIRON('WINDIR')
...
?
Thx a lot in advance.
P.S. Windows Vista Business.
Petro Bufan
Software Development Engineer
MS Dynamics NAV for MCPs
0
Comments
Declare an automation variable called WSH of type Windows Script Host Object Model.WshShell: and then
This prints the value of the environment variable %TEMP% of the session the RTC is running in. If you need it on the server side, just make the third parameter to CREATE a "false".
There are probably better ways, but this works for me.
Software Development Engineer
MS Dynamics NAV for MCPs
With reference to above I have another query i.e.
As we know that ENVIRON function is not supported in RTC hence how to get the value for windows user name in RTC. Earlier we use to get it by :
ENVIRON('USERNAME')
Thanks in Advance!
Regards,
Abhishek Pareek
I used this command:
WSH.ExpandEnvironmentStrings('%USERNAME%');
Thanks,
Abhishek