Computer Performance, Logon Scripts

Guy recommends :
Free Solarwinds
VM Console

Solarwinds VM Console Free Download

Find out which of your VMs are a waste of space and which VMs need more resources.


Guy's Review of
Computer Utilities

 1) FreePing
 2) Engineer's Toolset
 3) Xobni
 4) PuTTY
 5) WMI Monitor
 6) BgInfo
 7) Net-SNMP
 8) IP Address Tracker
 9) DNS Stuff
10) WinDiff Compare


Code Error 800A000D - Type Mismatch

Runtime Error 800A000D - Type mismatch

The runtime error 800A000D is straightforward to solve.  The secret is to read the Windows Script Error message carefully, then locate the line number with the Type Mismatch.

Introduction To Error Code 800A000D

This runtime error, 800A000D occurs when you execute a VBScript.  My suggestion is that there is a VBScript statement that does not understand a keyword you are using in your script.  Alternatively, you may not be running the script as an ordinary user and not as an Administrator.

The Symptoms You Get 800A000D Code 800A000D  - Type mismatch ' Join'

The script does not execute as you hoped, instead you get a Microsoft VBScript runtime error.  One possibility is that you are using a WSH object or method that has been misspelt.

Chuck kindly wrote in saying that another cause maybe that you are logged on as ordinary user, and not an Administrator.

The Cause of Code 800A000D

Your VBScript contains an illegal method, probably due to a typing mistake, an extra letter.  Look for a clue opposite the phrase Error: Type mismatch....  In particular, double check the spelling of your objects.

Note 1:  Source: Microsoft VBScript runtime error.  This is not a syntax error in the sense of a missing bracket, more a typo in the keyword mentioned in the Error: line of your WSH Message.

Note 2:  Error: Type mismatch: 'Join'.  Chuck says this could mean that you are logged on as an ordinary user and not an administrator.

Note 3:  What I have found, is that there need not be any errors per se in the script in order to receive the type mismatch join error. But what the cause has been for two of my recent experiences, is that the user in question, is only a part of a single group that isn't

1. A domain built-in group.
2. Query based distribution groups.

The join statement fails in this case because the CurrentUser.MemberOf only contains a single value so when it tries to append the next value, there is no array for it to search through. One fix would be to add error handling around this statement, so that if it fails, it runs the same line except without the join statement. The other option is of course to ensure your users are a part of more than one security or static distribution group. I haven't experimented with whether local domain, global or universal have an effect on this either, but I would imagine not.
Nathan Bicknell

The Solution of Runtime Error 800A000D

Check the spelling of your variables and methods.  Look for clues particularly the Line: number and check the Char: references.  In the example it is Line: 14  Char: 1.  In this instance the:  'Error: Type mismatch: 'CreateeObject'' tells us where the mistake is to be found. 

In the case of runtime errors you can use this work around.  Add this line: On Error Resume Next.  A better technique would have to employ error correcting code.

Try logging on as an Administrator, especially if your error says: Error: Type mismatch: 'Join'.  (My screen shot says Error: Type mismatch: 'CreateeObject' - clearly my error is a typo.  CreateObject.

If you are still stuck then a good script editor really would help this type of problem because it color codes the commands.  Free download of OnScript.

Example 1 of Error 800A000D Script

Error: CreateeObject- Extra letter e.  Look on line 14.

Correction: CreateObject - Corrected, letter e removed

' MapNetworkDrive.vbs
' VBScript Error 800A000D to map a network drive.
' Author Guy Thomas http://computerperformance.co.uk/
' Version 2.2 - April 24th 2010
' --------------------------------------------------------'
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "J:"
strRemotePath = "\\alan\home"

' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result J: drive
Set objNetwork = CreateeObject("WScript.Network")

objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
WScript.Quit

' End of Example Error 800A000D VBScript.

Guy Recommends: SolarWinds Engineer's Toolset v10Engineer's Toolset v10

This Engineer's Toolset v10 provides a comprehensive console of utilities for troubleshooting computer problems.  Guy says it helps me monitor what's occurring on the network, and each tool teaches me more about how the underlying system operates.

There are so many good gadgets; it's like having free rein of a sweetshop. Thankfully the utilities are displayed logically: monitoring, discovery, diagnostic, and Cisco tools.  Download your fully functional trial copy of the Engineer's Toolset v10

Example 2 of Error 800A000D ScriptError 800A000D Script Type mismatch

In this example, the VBScript runtime error message displays not only the line number but also the error string.

On this occasion, the fault is a $ (dollar) where VBScript expects an & (ampersand).

Actually, there is another mistake in line 10 it should be:
Set objRootDSE = GetObject("LDAP://"& strServer & " RootDSE")

Note the position of the two sets of speech marks.

' BindADUser.vbs
' VBScript to bind to AD and create a user in Users Container.
' Author Guy Thomas http://computerperformance.co.uk
' Version 2.3 - March 7th 2010
' ----------------------------------------------------'
Option Explicit
Dim objDomain, objUser, objRootDSE, strServer
strServer = "Alan"
Dim objContainer, strDNSDomain
Set objRootDSE = GetObject("LDAP://& strServer $ "/" $ RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
strDNSDomain = "OU=Accounts," & strDNSDomain
Set objDomain = GetObject("LDAP://" & strDNSDomain)
Set objUser = objDomain.Create("User", "cn=Guido 4Fawkes")
objUser.Put "sAMAccountName", "GuidoFawkes4"
objUser.SetInfo
WScript.Echo "Created " & objUser.get ("cn")
WScript.quit
' End of Script

Example 3 of Type Mismatch

strNewXP = strNewXP + intComputerNum

To join the two variables, I should have used was ampersand (&) not plus (+)

Solution

strNewXP = strNewXP & intComputerNum

Guy Recommends: WMI Monitor and It's Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.  Fortunately, Solarwinds have created the WMI Monitor so that you can examine these gems of performance information for free.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor


Do you need extra help?

For interpreting the WSH messages check Diagnose 800 errors.

For general advice try my 7 Troubleshooting techniques

Give something back?

Would you like to help others?  If you have a good example of this error, then please email me, I will publish it with a credit to you:

If you like this page then please share it with your friends

 


 *


Custom Search

Solarwinds Network Device MonitorSolarwinds' Free Network Device Monitor

Thus utility makes it easy to check the health of a router or firewall.  Check the real-time performance and availability statistics for any device on your network.

Get started with an extensive collection of "out-of-the-box" monitors for popular network devices.  Download your free Network Device Monitor

 

Home Copyright © 1999-2012 Computer Performance LTD All rights reserved

Please report a broken link, or an error.