Hello everyone,
I am not an expert in programming so forgive me if i ask a stupid question :)
At the company where i work i have an Winbatch application called Iv-Projectverkenner(Dutch). The program is sometimes giving an error(most times not) but i can't figure out what is going on. Inside the code there is a line which should create an persistent K: drive mapping to an variable folder path. The following line is used for this:
rtv = wntAddDrive(@DEFAULT,@DEFAULT, netpath, localname, persist)
The error i receive is "wntAddDrive WIL Extender Error: 499: Unrecognised network error #183"
Things i tried are the following:
Disable UAC;
Check if there is not an backslash at the end of the folder path;
Check if the drive is not already mapped;
Check if i can access the path by using If direxist(netpath).
Any help would be appreciated!
With kind regards,
Arnoud
System error code 183 has the message text 'Cannot create a file when that file already exists' associated with it. Seems a strange error given the nature of the function but perhaps it is the result of the drive letter already being assigned to physical device, a directory using the 'subst' command, or another share.
Note that you can find the text associate with system errors in our Tech Database or on MSFT's website.
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Error~Codes+!!Windows~System~Errors!!.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Error~Codes+!!Windows~System~Errors!!.txt)
@td Thank you for your reply, i am sure that the drive is not already mapped, and we are not using subst.
I also checked the permissions on all our folders.
With kind regards,
Arnoud Stolk
Then check the wwwbatch.ini file. The system network error should be in the [WWWNT34I] section of the file which can be found in the folder
%systemdrive%\Users\%nameuserrunningscript%\AppData\Roaming\WinBatch\Settings
on modern versions of Windows. For some unknown reason the network extender uses the current system error code instead of the error code returned by the network API function when it receives an unmapped system error. However, the API error is written to the wwwbatch.ini file. Generally, the error in the wwwbatch.ini file more accurately reflects the cause of the problem.
@TD,
Thank you for your reply, it took me a while to get the wwwbatch.ini information. The file provided me the following information:
wwwbatch.ini file after the crash:
[COM Exception]
SWbemObjectEx=Not found
SWbemServicesEx=Not found
Microsoft OLE DB Provider for SQL Server=Query timeout expired
[COM Sub-system]
Function=InvokeMember
ErrorCode=9 (0x80020009)
ErrorDesc=Exception occurred.
wwwbatch.ini file before the crash:
[COM Sub-system]
Function=InvokeMember
ErrorCode=9 (0x80020009)
ErrorDesc=Exception occurred.
I hope you can help me with this.
With kind regards,
Arnoud
It doesn't provide anything useful. Which version of WinBatch are you using and which version of the extender are you using?
Since you made reference to Dutch, the following may be relevant to your problem
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+wntAddDrive~and~Unicode.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+wntAddDrive~and~Unicode.txt)
I am getting the same error as well. As a matter of fact, the code I have worked on one run, I modified a MESSAGE statement and then the line no longer works. I can't believe the two are related. Anyway, here is the line:
wntAddDrive("%domain%\%UserID%",UserPW,"\\%machinename%.%domain%\C$","F:",@FALSE)
Inside of the winbatch.ini file, I have the following:
[WWWNT34I]
LastError=85 (WNetAddConnection2)
That says that the device is connected, but I don't see it connected anywhere. Any ideas?
UPDATE: Disregard. I figured out that when I first ran the code, I ran it under the context of am admin-level user but did not get to line to cancel the drive. So, while I didn't see the drive connected under my profile, it was connected under the other, admin-level profile.