When installing SharePoint 2010 and the .vbs file extension is registered to something else than VBSfile in the Windows registry (in my case to Notepad++ on my new DEV machine) , then the PrerequisiteInstaller will fail with the error
Error: The tool was unable to install Application Server Role, Web Server (IIS) Role.
When running the installation with AutoSPInstaller you will only get the cryptic message:
... ------------------------------------------------------------- -------------------------------------------------------------- - Installing Prerequisite Software: - Running Prerequisite Installer... -------------------------------------------------------------- Script aborted! Exception : System.Management.Automation.ParameterBindingValidation Exception: Cannot bind argument to parameter 'Message' because it is null.
In the logfile of PrerequisiteInstaller you can find the command which is causing the issue
"C:\Windows\system32\cscript.exe" "C:\Windows\system32\iisext.vbs" /enext "ASP.NET v2.0.50727"
Which obviously activates ASP.NET v.2.0 in IIS
Running that command manually reveals the issue
C:\Install\SharePoint>"C:\Windows\system32\cscript.exe" "C:\Windows\system32\iisext.vbs" /enext "ASP.NET v2.0.50727" Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Input Error: There is no script engine for file extension ".vbs".
The fix isto go into Registry editor, navigate to HKEY_CLASSES_ROOT\.vbs and change the “(Default)” entry from Notepad++ file back to the standard vbsfile.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.vbs] ; @="Notepad++ file " ; change the default value from Notepad++ file back to vbsfile @="vbsfile" "Content Type"="application/x-vbscript" [HKEY_CLASSES_ROOT\.vbs\PersistentHandler] @="{5e941d80-bf96-11cd-b579-08002b30bfeb}" [HKEY_CLASSES_ROOT\.vbs\ScriptEngine] @="VBScript"
see also
http://jamesmcdonald.id.au/it-tips/input-error-there-is-no-script-engine-for-file-extension-vbs