开发者

Cannot execute a javascript script file from windows explorer or the DOS prompt

I'm a C++ developer and want to install the WTL appwizard to Visual Studio 2010. To do this, I must run开发者_Go百科 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?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜