HOW TO: Use the JScript .NET Command-Line Compiler from Any Directory (306600)



The information in this article applies to:

  • Microsoft JScript .NET
  • Microsoft .NET Framework 1.1
  • Microsoft .NET Framework 1.0

This article was previously published under Q306600

SUMMARY

This step-by-step article describes how to use the Jscript .NET command-line compiler from any directory. The JScript .NET command-line compiler (Jsc.exe) is located in the \System Root\ Microsoft.NET\Framework\Version Number directory on your computer. Typically, you can only use the compiler in this directory, unless you specify additional path information for compilation.

Note System Root is the Microsoft Windows directory of your computer and Version Number is the version of the .NET Framework that you have installed on your computer. If you have more than one version of the .NET Framework installed, you must determine which version to use (typically, you would use the latest version).

back to the top

Modify the PATH Environment Variable

  1. Right-click Start, and then click Explore.
  2. In the left pane, right-click My Computer, and then click Properties.
  3. Click the Advanced tab, and then click Environment Variables.
  4. Under System Variables, click Path and then click Edit.
  5. In the Variable Value text box, put the insertion point at the end of the existing text (to the right), type the following path, and then click OK:

    ;\System Root\Microsoft.NET\Framework\Version Number

    Example:

    ;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

  6. Click OK.
back to the top

Test the Modification

  1. Click Start, and then click Run.
  2. In the Open text box, type the following command, and then press ENTER:

    jsc /?

    The console appears and contains Jscript .NET compiler options.
back to the top

Troubleshoot

  • Change the path in the example to match your system configuration.
  • You must have the Microsoft .NET Framework installed on your computer. You can install the .NET Framework when you install Visual Studio .NET, when you install another application that includes the Framework, or as a separate installation.
  • Make sure that you append the directory name, including the semicolon separator, to the existing path. Do not overwrite the existing path.
back to the top

REFERENCES

For more information about how to compile JScript code from the command line, visit the following Microsoft Web site:back to the top

Modification Type:MajorLast Reviewed:6/18/2003
Keywords:kbScript kbCompiler kbCommandLine kbHOWTOmaster KB306600 kbAudDeveloper