Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting network shares
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00916988
Message ID:
00917062
Vues:
9
This message has been marked as a message which has helped to the initial question of the thread.
>I am getting the network shares on a computer by using the following command:
>
>ANETRESOURCES('myshares', 'toledo', 1)
>
>This works fine provided you know what the network name is. ('toledo' in this case) How can you get the network shares if you do not know what the network name is? Or how can you get the network name so you can supply it to ANETRESOURCES()?
>
>Thanks for any help you can provide me.

Well, I am confused. I think 'toledo' in your case is a domain, for if it were a network name it should start with '\\' From the help: The network name should be in the format "\\NetworkName."

So, if you are using a domain, you can get this easily if you are using windows XP (I do not have any other version of windows to test it)

lcDomain = getenv('USERDOMAIN')

Using scripting, you can use:

loNetwork = createobject('WScript.Network')
lcDomain = loNetwork.UserDomain
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform