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  800A03EE - Expected ')'

Troubleshooting Code 800A03EE - Expected ')'

This Error 800A03EE can be tricky.  While it is indeed a syntax error, it may not be where you expect.  Therefore, check the Char: Number for the line of this error.

Introduction to Code 800A03EE

Error code 800A03EE occurs when you execute a VBScript.  You receive a message box from Windows Scripting Host.  Code 800A03EE means a syntax error, check your punctuation especially the ampersands.Code 800A03EE VBScript Expected ')'

The Symptoms You Get

The script does not execute as you hoped, instead you get a WSH error message.

The Cause of Code 800A03EE

Your VBScript contain is missing a argument.   Note: The clue, Error: Expected ")'.  There is something wrong with a bracket or a speech mark.

Source: Microsoft VBScript compilation error, means there is a syntax error in your script, rather than a logical error with a server or network object.

The Solutions

The Windows Scripting Host gives us three useful clues, firstly, look on Line: 6, do count any remark or empty lines.  Secondly, the Char: number (34), is very useful in tracing the error.  In this case there is something wrong at the end of line 6.  Thirdly Error: ')' is pointing us to the script problem.  Therefore, check the syntax of your script and balance your brackets.

  ‡

Example 1 of Script Code 800A03EE error

Note: The Line: 6 Char 34 strcn

It should be strcn)  note the closing bracket

 

'CREATE USER AND SET PASSWORD
strcn = "bilbo65"
strsam= "bilbo65"
strpasswd = sbuline9
Set objOU=GetObject("LDAP://ou=Droitwich,dc=cp,dc=com")
objUser = objOU.Create("User", "cn=" & strcn
objUser.Put "sAMAccountName","bilbo65"
ObjUser.SetInfo
objUser.SetPassword strpasswd
 

Corrected Version

 

'CREATE USER AND SET PASSWORD
strcn = "bilbo65"
strsam= "bilbo65"
strpasswd = sbuline9
Set objOU=GetObject("LDAP://ou=Droitwich,dc=cp,dc=com")
objUser = objOU.Create("User", "cn=" & strcn)
objUser.Put "sAMAccountName","bilbo65"
ObjUser.SetInfo
objUser.SetPassword strpasswd
 

 

Example 2 - Missing ampersand

Sometimes Expected ')' is not the true problem, the real villain is the ampersand, or to be precise the missing ampersand (&). 

Code 800A03EE missing ampersand

In terms of troubleshooting, we need to check Line: 11, Char: 37.
Set objDomain = GetObject("LDAP://" strContainer)

There should be an ampersand :

Set objDomain = GetObject("LDAP://" & strContainer)

 

' CreateOU.vbs
' VBScript to Create a new OU, with 2 child OUs
' Author Guy Thomas http://computerperformance.co.uk/
' Version 2.8 - March 10th 2010
' ----------------------------------------------------'
Option Explicit
Dim objOU, objDomain, strNewOU, strContainer
strNewOU = "OU=St1 Hilary"
strContainer = "dc=cp,dc=com"

Set objDomain = GetObject("LDAP://" strContainer)
Set objOU = objDomain.Create("organizationalUnit", strNewOU)
objOU.SetInfo
Set objDomain = GetObject("LDAP://dc=cp,dc=com")
set objOU = objDomain.Create("organizationalUnit", "OU=Permies" & "," & strNewOU)
objOU.SetInfo
Set objDomain = GetObject("LDAP://dc=cp,dc=com")
Set objOU = objDomain.Create("organizationalUnit", "OU=Temps" & "," & strNewOU)
objOU.SetInfo

WSCript.Echo"Created OU " & strNewOU
WScript.Quit

' End of Script

 

Example 3 of Script Code 800A03EE error

Here is another example of Code 800A03EE , note the position of the speech marks, it should be:

Set objOU =GetObject("LDAP://ou=Worcester,dc=CP,dc=com")
 

 

' BindAD.vbs
' VBScript to bind to Active Directory
' Author Guy Thomas
' Version 2.5 - March 10th 2010
' ----------------------------------------------------'
Dim objOU, obUser
Dim strContainer
Set objOU =GetObject("LDAP://"ou=Worcester,dc=CP,dc=com)
Set objUser = objOU.Create("User", "cn=GuidoF")
objUser.Put "sAMAccountName", "GuidoF"
objUser.SetInfo
WScript.Echo "Created" & objUser.get ("Cn")
WScript.quit
 

 

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.