>sys(0) is giving me the user name and the local workstation name.
>what i am looking for is somethig equivalent for the server, from where my application.exe file is called from.
>
>eg if it is started from \\server1\appdir\ some application should not be available, if it is startet from a local computer it should be available.
>
>Regards
>ernst
sys(16,0) would return the fullpath of exe (or application.servername).
If it's a mapped drive than wouldn't be sufficient. Then you could use WNetGetConnection :
declare integer WNetGetConnection in win32API ;
string @ lpLocalName, ;
string @ lpRemoteName, ;
integer @ lpnLength
lpLocalName = "z:"
lpRemoteName = space(512)
lpnLength = 512
if WNetGetConnection(lpLocalName, @lpRemoteName, @lpnLength) = 0
? substr(lpRemoteName, 1, lpnLength)
endif
Cetin