Help with unrecognised network error #183

Started by mcvpjd3, February 04, 2015, 04:48:37 AM

Previous topic - Next topic

mcvpjd3

Can anyone help with this?

my code is basically this:


AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
mapdriveuser="servername\user"
mapdrivepass="mypassword"
mapdrivename="\\servername\share"
maplet="N:"

retg=wntAddDrive(mapdriveuser,mapdrivepass,mapdrivename,maplet,@FALSE)


The server is on a different domain, but the user is a local user for that server.

I always get

WIL Extender Error: 499: unrecognised network error #183

using Net Use command work fine.

Any help appreciated.

ChuckC

Win32 Error code 183 is documented as follows:

ERROR_ALREADY_EXISTS - Cannot create a file when that file already exists.


I'm not entirely certain how that error should come about from trying to map a drive letter, though.  If the specified local drive letter "N:" was already connected, I'd have expected a different error code, such as ERROR_ALREADY_ASSIGNED [Win32 Error code 85].

If your user session already had a connection to the server with different credentials, I'd have expected yet another error to be returned which indicates that there's a credential conflict of some sort.


You mention that manually using the NET USE command in a console window works fine, but you haven't mentioned a couple of important details that might help with troubleshooting the problem.

1)  Is your script being executed via the WIL interpreter, or is your script compiled into an EXE?

2)  Is UAC enabled?

3)  If UAC is enabled, is your script being executed when elevated as an administrator, or is it running restricted?

4)  If UAC is enabled, In the console window where you successfully use the NET USE command, is the console window running elevated as an administrator, or is it running restricted?


td

The extender's error handler is written to report the 'GetLastError' API error instead of reporting the error returned by the Windows Network API function.  If it were reporting the network API error, the unknown error would have been 53 which translates to 'The network path was not found.'  I believe the correct error is reported in the wwwbatch.ini file so the OP could check that to confirm the error.

That said chances are that the error is the result of some kind of permission issue quite possibly related to UAC as already suggested.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade