Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to identify the server name.
Message
 
 
To
07/08/2003 14:26:53
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00817893
Message ID:
00817918
Views:
11
>I have a need to identify the server name that an executable is running from. I know I can get the path of the executable, but that contains the logical drive letter, not the name of the server. Is there a Windows API call or VFP SYS() function for this.
>
>Many thanks,

Try
oFso = CreateObject("Scripting.FileSystemObject")
lcDriveLetter = LEFT(_VFP.ServerName,1)
oDrv = oFso.GetDrive(lcDriveLetter)
? oDrv.ShareName
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform