Information générale
Catégorie:
Codage, syntaxe et commandes
I have an application that needs to gather a list of all Windows machines available on the local network. The app will then display part of the list and let the user select from it. Most of the machines are the default workgroup called "WORKGROUP" and I can see them by running this test code:
a = ANETRESOURCES(b, "workgroup", 0)
FOR c = 1 TO a
? b(c)
ENDFOR
However, some machines that the app needs to see may be in another workgroup and I don't want to have to hard-code any workgroups in the app. I've tried running the same code replacing "workgroup" with "", and I get 2 results:
NetWare Services
Microsoft Windows Network
Manually navigating through My Network Places gives me these 2 options at the "Entire Network" level. Drilling down into Microsoft Windows Network gives me a list of 3 workgroups. Drilling down into workgroup "workgroup" gives me a list of the machines (from the first time I ran the code above). How can I get ANETRESOURCES (or another function) to return a list of the workgroups available? Replacing "workgroup" with "Microsoft Windows Network" in the above code doesn't work.
Mark
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement