.reg script:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.js]
@="JSFile"
manually: use regedit:
go to HKEY_CLASSES_ROOT\.js:
set (Default) = JSFile
assoc .js=JSFILE did not work for me: assoc was not editing the registry, and cscript.exe was reading from the registry:
whatever value is set as (Default), cscript.exe will attempt to read the following key: HKEY_CLASSES_ROOT\%s\ScriptEngine, normally, it would be HKEY_CLASSES_ROOT\JSFile\ScriptEngine
I got this error while running cscript.exe on a script.js
cscript.exe //NoLogo AutoHotkey_alpha\source\scripts\minman.js