views:

28

answers:

2

I'm a C++ developer and want to install the WTL appwizard to Visual Studio 2010. To do this, I must run a .js script file.

I recently tried out Aptana IDE and it's clobbered the .js file association, and now I cannot execute this .js script file.

How can I execute .js script files again?

+1  A: 

In an explorer window go to the Tools Menu and Folder Options, File Types Tab

Go to JS - JScript File

  • Set Edit as C:\WINDOWS\System32\Notepad.exe %1
  • Set Open as C:\WINDOWS\System32\WScript.exe "%1" %*
  • Set Print as C:\WINDOWS\System32\Notepad.exe /p %1
  • Set Open with Command Prompt as C:\WINDOWS\System32\CScript.exe "%1" %*

Those are the defaults. If you want, only change what you want to change, or just run the commands manually if you want to keep your new association

Luke Schafer
great, thanks for that, didn't know about wscript at all!
freefallr
+1  A: 

You can run js or vbs files with help of wscript.exe or cscripts utils

Syntax in command line is

wscript your_js_file.js
SageNS