Sunday 6 April 2008

No Script Engine For File Extension Error Fixed With No Reinstall Or INF Files!

I'm sure there are many people out there who have been confronted with the Windows Scripting Host error "No script engine for file extension <file extension>". This is the error I was confronted with today and have spent the last few hours working on a solution to it and I have just found it.

After finding that files with the .vbs extension were working fine I opened the registry using regedit.exe. Remember if you are going to mess with the registry back it up first because if you remove the wrong key it can destroy your system. Under the HKEY_CLASSES_ROOT key I navigated to the .js key. There is a string value named Default that had the value set to "(Default)". I changed this to "JSFile", without the quotes.  Looking at the .vbs key it also has a string value named Default with the value set to VBSFile. With this change made I closed regedit.

Navigate to the .js file you are trying to execute and right click on it. Select Open With from the menu and ensure that the Microsoft Windows Based Script Host has been chosen. If not select Choose default program and select the Script Host entry. Close the dialog and double click on the JavaScript file you want to execute. It should now execute without any problems.

No comments:

Post a Comment