cscript.exe and wscript.exe notes

 

 

What to enter for "engine" in cscript command line: It looks like "vbscript" is OK, and I've personally used "jscript".

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

//E:engine

Executes the script with the specified script engine. Among other things, this allows you to run scripts that use a custom file name extension. Without the //E argument, you can run only scripts that use registered file name extensions. For example, if you try to run this command:

cscript test.admin

You will receive this error message:

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

To run a script that uses a custom file extension, include the //E argument:

cscript //E:vbscript test.admin

One advantage of using nonstandard file name extensions is that it guards against accidentally double-clicking a script and thus running something you really did not want to run.

This does not create a permanent association between the .admin file name extension and VBScript. Each time you run a script that uses a .admin file name extension, you will need to use the //E argument.

 

tags: cscript, wscript, jscript, vbscript, command, line

Related Scribbles:
  • Script a registry change for all users
  • WMI Overview
  • Windows
  • Registry Tools


  • ID: 950
    Author:
    leonard
    Date Updated:
    2010-04-21 16:19:51
    Date Created:
    2010-04-21 16:19:05

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> cscript.exe and wscript.exe notes
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.