WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

NetInfo API Info

Keywords:     netinfo api

Question:

I'm using the NetInfo function, and on some of my Windows 95 machines, Netinfo(1) returns a blank string, when I have the MS Client for Windows and the MS Client for Netware. Why?

Answer:

NetInfo just returns exactly what windows returned to us. WinBatch is kinda dumb about that function. I'm not sure what is going on.

Does that client actually show up in Control Panel, under Network? It could be in the registry even if it's not currently installed.

Here's the API call information, that Windows is passing to us:

  1. In the 16-bit version, it calls WNetGetCaps().

  2. In the 32-bit version, it gets the list of installed networks out of the registry. But all the keys you see there are not installed networks, so you'll have to check in Control Panel to find out what's really installed on that machine. Here's where we read the registry:

    In Win95:

    		HKEY_LOCAL_MACHINE\Enum\Network
    	

    In WinNT:

    		HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\NetworkProvider\Order
    	
We look to see what subkeys there, and in older versions of Winbatch prior to 99D, we look at the top subkey (they'll be numbered 0000 through whatever, depending on your system). In 99D and later, we look at all subkeys for the class next to 'netclient'.

We look through the first key searching for the class "netclient". So for example, under VREDIR, under 0000, (after several installations of the netclient, it's possible that your first key might not be 0000), to the right under class, if the network client is installed, it should say, "netclient" under "class". We only look at the first key, and it might be the case that that key might not have the correct information.

So... look in your control panel; which clients are installed? (the clients will have the special client icon next to them).

Next, go into your registry and find the key that you expect should be showing up in netinfo. Look under the top level key, and on the right, under "class", what value does it have? If it doesn't say "netclient", then that's why the function is not returning this value.

If NetInfo(1) on 32-bit windows returns a null value, that means that your registry keys are in some non-standard configuration that NetInfo didn't understand. The NetInfo function in WB98D has been changed so that we can read these non-standard registries as well.


Article ID:   W13096
Filename:   NetInfo API Info.txt
File Created: 1999:04:15:16:51:44
Last Updated: 1999:04:15:16:51:44