Courseiva
mediumMultiple ChoiceObjective-mapped

220-1102 Practice Question: That a scheduled task runs a VBScript every…

A user reports that a scheduled task runs a VBScript every morning, but the script fails with an 'ActiveX component can't create object' error. The script uses a COM object to interact with an application. What is the most likely cause of this error?

⚠ Common exam trap

CompTIA often tests the distinction between runtime COM registration errors and other script failures, so the trap here is that candidates mistakenly attribute the error to permissions or syntax when the root cause is a missing or unregistered COM component.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The COM object's DLL is not registered or the application is not installed

The 'ActiveX component can't create object' error occurs when the VBScript's CreateObject call fails because the COM class it references is not available. This typically means the DLL that implements the COM object is not registered (e.g., via regsvr32) or the application that provides the object is not installed on the system. Without the registered COM component, the script cannot instantiate the object, leading to this specific runtime error.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The script is running with insufficient permissions to create files

    Why it's wrong here

    If a script encounters insufficient permissions to create files, the resulting error would typically be an 'Access Denied' message (e.g., error code 5) when the file write operation is attempted. The 'ActiveX component can't create object' error specifically indicates a failure during the initial instantiation of the COM object itself, meaning the object could not even be brought into existence, let alone perform file operations. This error precedes any potential file access issues the object might encounter.

  • The COM object's DLL is not registered or the application is not installed

    Why this is correct

    The 'ActiveX component can't create object' error (runtime error 429) is a direct indication that the operating system cannot locate or instantiate the requested Component Object Model (COM) component. This almost always occurs because the necessary COM server, often a Dynamic Link Library (DLL) or Executable (EXE), is either not properly registered in the Windows Registry or the application package containing the component is not installed on the system. Without proper registration, the `CreateObject` function cannot find the class ID (CLSID) or programmatic ID (ProgID) required to create an instance of the object.

  • The script contains a syntax error in the CreateObject line

    Why it's wrong here

    A syntax error, such as a misspelled keyword, missing parenthesis, or incorrect operator within the `CreateObject` line, would typically be caught by the script interpreter during parsing or compilation, or as a different type of runtime error. This would result in messages like 'Syntax error,' 'Expected expression,' or 'Type mismatch,' rather than an error specifically indicating that the 'ActiveX component can't create object.' The script would fail to parse correctly, preventing the `CreateObject` call from even being attempted.

  • The scheduled task is set to run when the user is not logged in

    Why it's wrong here

    While a scheduled task running without an interactive user session might encounter issues related to user profile loading, environment variables, or access to network resources (like mapped drives), it does not inherently prevent the creation of a standard COM object. The 'ActiveX component can't create object' error points to a fundamental problem with the COM component's availability or registration on the system, which is independent of whether a user is logged in or not, assuming the task runs under an account with sufficient privileges to access the COM server.

About these practice questions

One of 495 original 220-1202 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 220-1202 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 220-1202 exam.