Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: wntResources2 Wil Extender Error 531, Invalid Parameter
Example:
AddExtender("WWWNT34I.DLL") ;;examples for the different types of resources. providers = wntResources2("", 2, 0, 2, "") domains = wntResources2("", 2, 0, 2, "Microsoft Windows Network") servers = wntResources2("OFFICE", 2, 0, 2, "Microsoft Windows Network") shares = wntResources2("\\SERVER", 2, 0, 1, "Microsoft Windows Network")
In the below code, shares1 results in a return of all the volumes on the server. Shares2 results in the following error message: "Wil Extender Error 531, Invalid Parameter". I am trying to get only those resources to which the user is currently attached. What's wrong?
Anytime I used a "1" as the Scope parameter, I get the invalid parameter error. I need the functionality of a scope of "1" to see only those resources that the user is currently using, not what is available on the network.
AddExtender("WWWNT34I.DLL") shares1 = wntResources2("\\SERVER01", 2, 0, 1, "NetWare or Compatible Network") shares2 = wntResources2("\\SERVER01", 1, 0, 1, "NetWare or Compatible Network")Question#2:
I want to use the NT extender to get information equivalent to a "net use" command at the NT workstation. What functions are available for this?
The scope=1 problem is a limitation of the wntResources2 function, which isn't properly documented. You can itemize all current or persistent connections network-wide, with the 1 as the second parameter, eg:
wntResources2("", 1, 0, 1, "")When you use the 1 as the second parameter, it will ignore the net-resource parameter, regardless of what you specify.
Or you can itemize all available resources under a specific "parent" resource, with the 2 as the second parameter, eg:
wntResources2("\\PIZZA", 2, 0, 1, "Microsoft Windows Network")But you can't do both at the same time, ie, you can't itemize current connections under a specific resource network-wide. The 'net-resource' and 'provider' parameters must be blank strings unless 'scope' is set to 2.
You can get most of the functionality of "net use" by using DiskScan(4) to return a list of mapped network drive letters, and then using wntGetCon() to get the network path that each letter is mapped to.
Article ID: W13536
Filename: Get a List of Attached Servers to NT Server.txt
File Created: 2001:03:01:13:50:34
Last Updated: 2001:03:01:13:50:34