-2

After i was forced to shutdown my pc forcefully with the button, my js files became without a default app, when i click on a js file the dialog box didn't have the checkbox 'always use...' anymore, when i tried to set an app manually from the file properties 'Open with' it didn't change it keep being unknown application.

This problem isn't only with js extension i can't change any extension's default app.

Edit: I can't change it from default apps sittings either, when i choose notepad++ or other programs, it set it automatically to "Microsoft windows based script host" the only program that get accepted otherwise is visual studio

  • Possible duplicate of SSMS wont give up file associations – Ramhound Nov 20 '18 at 12:48
  • Try to do it from "Default programs". – harrymc Nov 20 '18 at 15:38
  • It didn't work either, when i choose notepad++ or other programs it set it automatically to "Microsoft windows based script host" the only program that get accepted otherwise is visual studio? – habibhassani Nov 20 '18 at 15:59
1

You need then to do it the hard way:

  • Open regedit
  • Navigate to the key HKEY_CLASSES_ROOT\JSFile\Shell\Open\Command
  • Double-click the (Default) item
  • Save its current value as backup
  • Enter the new value "C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"
  • And the deed is done.

You may also use the following .reg file:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\JSFile\Shell\Open\Command]
@="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\" \"%1\""
  • Thank you for your idea but it didn't work – habibhassani Nov 20 '18 at 21:40
  • It worked for me. I wonder what's different on your side. – harrymc Nov 20 '18 at 22:20
  • Yeah its really strange, well i will just wait for the problem to solve itself with some windows updates or program installation, thanks for your help man. – habibhassani Nov 21 '18 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.