Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find a computer's name?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00630121
Message ID:
00630329
Vues:
21
>>>Thank You.
>>
>>You're welcome.
>>
>>>As far as you know does this work on all Windows operating systems. At least Windows 98 and after.
>>
>>Under Windows 98 the WSH is an optional component. Ed Rauh and I wrote about the supported platforms in detail in the first of our series of five articles on the Windows Script Host that appeared in the VFUG newsletters beginning September, 2000. The WScript.Network object was covered in the fourth article. All of them are available on-line at www.vfug.org.
>
>
>Sorry for piggybacking...
>George, I was hoping you will notice my question regarding the WSH Network object, in the Thread #628102 Message #628102...

No problem, Doru. I just couldn't give you an authoritative answer on your question about the WSH aspect. Therefore, what follows is speculation on my part.

It looks like the WScript.Network object returns the user name that originates when you log in. Unfortunately, it doesn't expose any methods to retrieve what id was used to login to a given drive. That's the bad news.

The good news is that the WNetGetUser() function in the API does allow you to specify the drive, and should return the proper name. There's an entry for it in the API section here that should give you enough information to test it.

Let me know if you have any problems.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform