No of visitors who read this post: 287
Category: Misc Software
Type: Question
No votes yet

80020005 is the error code which occurs when I try to run a VBScript. Usually, I used MapNetworkDrive or SetDefaultPrinter methods to get access to log-on. Please advise on how to resolve this concern. Thank you.

Error:

Windows Script Host    
Script: E:\Ezine\Scripts\ezine3\MapNetworkDrive    
Line: 9    
Char: 1    
Error: Type missmatch    
Code: 80020005    
Source: WSHNetwork.MapNetworkDrive    
 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

Hi,

This error arises when we execute a VBScript. Your logon script is possibly using a process called MapNetworkDrive or SetDefaultPrinter.The apparent situation is that you are trying to create a Windows logon script.

What has occurred here is there are loads of arguments in your VBScript method.  The MapNetworkDriveMethod only requires a drive letter and a RemotePath.  Look into the Source, to know which method is creating error, for instance, MapNetworkDrive method or SetDefaultPrinte method. Look into the number of arguments needed by the script method and match up to with arguments that you used in your script.  For instance, alter WShNetwork.- MapNetworkDrive - DriveLetter, strRemoteName - RemotePath.

To: WShNetwork. - MapNetworkDrive – DriveLetter- RemotePath

Search for hints in the Line number, by the way, char: 1 is not useful; this type of fault only traces the first character although the error is more next to the line.