CScript Error: Can't find script engine "VBScript"

CScript Error: Can't find script engine "VBScript"

I have in some situations seen a problem where I suddenly is unable to start a vbscript in an SCCM 2012 OSD task sequence with another account specified.

When the situation occurs I can see this error in the smsts.log:

CScript Error: Can’t find script engine “VBScript” for script

image

The problem appears to be caused by a changed registry value HKEY_LOCAL_MACHINESoftwareMicrosoftCOM3REGDBVersion

When REGDBVersion has the value hex:01,00,00 then vbscript’s works as expected.

Until now I have seen that VMware tools and Citrix XenApp can change the value breaking the possibility to start vbscript’s with another account in the task sequence.

REGDBVersion value after XenApp 6.5 installation hex:f8,01,00,00,00,00,00,00

REGDBVersion value after VMware Tools installation 06,00,00,00,00,00,00,00

One way around the problem is to call the script before installing software that changes this value.

If this is not possible this can be used as a workaround.

Save the existing registry values under the COM3 key, and then change the value of REGDBVersion to the working value.

Now the script can run and afterwards you can restore the saved keys.

Backup:

REG EXPORT HKLMSoftwareMicrosoftCOM3 %temp%com.reg /y

image

Set Working value

REG ADD HKLMSoftwareMicrosoftCOM3 /v REGDBVersion /t REG_BINARY /d 010000 /f

image

Call your script (example)

image

Restore values:

REG IMPORT %temp%com.reg

image

Table of Contents

Share this post
Search blog posts
Authors
Modern Workplace consultant and a Microsoft MVP in Enterprise Mobility.
Modern Workplace consultant and a Microsoft MVP in Windows and Devices for IT.

Infrastructure architect with focus on Modern Workplace and Microsoft 365 security.

Passionate IT professional with 20+ experience in IT architecture, consulting, and design. 

Cloud & security specialist with focus on Microsoft backend products and cloud technologies.

Infrastructure architect with focus on design, implementation, migration and consolidation.

Infrastructure consultant with focus on cloud solutions in Office365 and Azure.

follow us in feedly
Categories

Follow on SoMe