none
Input Error: There is no script engine for file extension ".bat"

    Question

  • Hi,

    I'm currently trying to solve a problem we have with a certain windows domain user, let's call it DOMAIN\ScriptRunner, which sole purpose is to run scripts (.bat-, .cmd- or .vbs-files). Currently colleagues of mine have created a .bat-file that calls another .bat-file. using a command-line like this in the first .bat-file:

    start /B /wait cscript \\ServerAlias\Share\Jobscript\TEST.bat > \\ServerAlias\Share\Log\TEST.log 2>&1

    This method of running scripts works just fine on other servers (not tested with the above mentioned user DOMAIN\ScriptRunner) and on the same server if you logon as another user and run the script.

    However when this particular user is trying to run the script, we get the following output and error message:

    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Input Error: There is no script engine for file extension ".bat".


    I have tried right-clicking C:\WINDOWS\inf\wsh.inf and selecting Install, to reinstall Windows Scripting Host, but that did not help. We have also removed the user ScriptRunner's user profile and logged on once again to recreate it, in case anything regarding the user profile would be the cause of the problem, but still no luck.

    I have also turned security audting on in C:\ for user ScriptRunner, but I don't get any Failure audits in the security log. 

    The server is a Windows Server 2003 Standard x64 Edition SP2.

    Any thoughts or tips about what might be causing the problem would be most appreciated.

    Thanks,
    Johan G
    Johan G
    Thursday, October 30, 2008 5:42 PM

Answers

  • Hello Johan,

     

    Please note that this forum is for problems on Core Installation of Windows Server 2008 (compared with the full installation of Windows Server 2008). If you have question relating to Windows Server 2003, you can post in other forums, like our Windows Server General forum:

     

    http://social.technet.microsoft.com/Forums/en-US/winservergen/threads/

     

    Regarding this error message, well, this is expected behavior as I noticed that you put both 'cscript' and '.bat' in this command. Cscript.exe does not work with '.bat' files, it supports VBScript (.vbs) and Jscript (.js). Please take a look at the following article for some general information:

     

    http://technet.microsoft.com/en-us/library/bb490887.aspx

     

    So, as a workaround, you can either remove the 'cscript' character or, change the batch file to VBScript.

     

    Best regards,

    Chang Yin
    Monday, November 03, 2008 12:51 PM

All replies

  • Hello Johan,

     

    Please note that this forum is for problems on Core Installation of Windows Server 2008 (compared with the full installation of Windows Server 2008). If you have question relating to Windows Server 2003, you can post in other forums, like our Windows Server General forum:

     

    http://social.technet.microsoft.com/Forums/en-US/winservergen/threads/

     

    Regarding this error message, well, this is expected behavior as I noticed that you put both 'cscript' and '.bat' in this command. Cscript.exe does not work with '.bat' files, it supports VBScript (.vbs) and Jscript (.js). Please take a look at the following article for some general information:

     

    http://technet.microsoft.com/en-us/library/bb490887.aspx

     

    So, as a workaround, you can either remove the 'cscript' character or, change the batch file to VBScript.

     

    Best regards,

    Chang Yin
    Monday, November 03, 2008 12:51 PM
  • Hello Chang,

    Sorry for posting in the wrong forum, and thanks for the reply. The reason for the error became obvious to me when I checked my colleagues other scripts. All the other scripts got a .vbs-script as an input parameter, so that's why cscript worked in all the other places.

    Thanks,
    Johan G


    Johan G
    Monday, November 03, 2008 3:00 PM