Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start error: There is no script engine for file extension ".js" #20

Closed
pratham2003 opened this issue Feb 6, 2024 · 8 comments
Closed

Comments

@pratham2003
Copy link

Solution: https://www.winhelponline.com/blog/error-there-is-no-script-engine-for-file-extension-when-running-js-files/
Please see if there is a need to integration this into the installer in some way.
What made it work for me was the registry fix.

I am on a upgraded Windows 10 -> Windows 11 system so the error could be specific to my system. Leaving a note of it here for others. If this issue is not reproducible on a Windows 11 system then please close the ticket.

@Bill-Stewart
Copy link
Owner

Indeed, Syncthing Windows Setup assumes proper script host registration, which should normally be the case even when a system gets upgraded. (Perhaps you had another software that interfered with this.)

There are many, many possible root causes of this problem that are totally unrelated to Syncthing Windows Setup. Perhaps we can detect the incorrect registration, notify the user, and fail the install? (I think it's really beyond the scope of this project to actually fix it.)

I'm going to leave this open for now to see if we see a pattern.

@0PandaDEV
Copy link

I have the exact same problem also why does Syncthing Windows even install this weird user folder called SyncthingServiceAcct when installed for every user it then does not allow me to sync folders outside this user folder which makes Syncthing useless also there is no tray icon.

@Bill-Stewart
Copy link
Owner

Bill-Stewart commented Feb 21, 2024

I have the exact same problem

I would suggest to use the instructions in the link posted by the other user (which reportedly worked). As I already said, this is an issue where the script engine registration is broken on your system, which is: 1. Not a normal state of affairs (hence the term broken) and 2. not this installer's fault.

Syncthing Windows even install this weird user folder called SyncthingServiceAcct when installed for every user it then does not allow me to sync folders outside this user folder which makes Syncthing useless also there is no tray icon.

You installed using administrative (all users) mode. I would suggest reading the documentation for the installer if you want to run the service. If you don't, I would suggest uninstalling and install for your current user instead.

Regarding a "tray icon": No, there isn't one, nor do I see a need for one. Just click on the "Syncthing Configuration Page" shortcut to manage Syncthing using the web interface.

@0PandaDEV
Copy link

I fixed it by installing a very old version and then installing it the newest with this is fixed the Start error: There is no script engine for file extension ".js" error and the installation was not done in admin mode. But what seems to not work for me is installed the newest version for user only, that option never came up other than in the previous versions.

@Bill-Stewart
Copy link
Owner

I fixed it by installing a very old version

I'm pretty sure that this worked completely by accident (something else must have fixed it), because there's no code in Syncthing Windows Setup that does anything about fixing script engine registration.

But what seems to not work for me is installed the newest version for user only, that option never came up other than in the previous versions.

If you installed in administrative installation mode (all users) and want to switch to per-user instead, you have to perform a full uninstall of the administrative installation first.

I would definitely encourage reading through the documentation, which spells out the details of how the installer works.

@Bill-Stewart
Copy link
Owner

It appears there are a number of other GitHub projects that use WSH (Windows Script Host) scripts and reports of people running into the same problem; for example:

coreybutler/nvm-windows#133

As noted by that project's author in one of the responses: If you get an error about "can't find script engine," something disabled and/or broke the Windows script engine on your system.

[Sidebar: It seems that, like with PowerShell, there is paranoia about WSH scripts being malware simply because they can execute code. No doubt some bad actors have written malicious code using PowerShell and WSH scripts, but they can do likewise with many other tools. It seems that since PowerShell and WSH are "baked into" the operating system, some security people (who possibly do not understand how Windows security works) advocate for disabling these useful built-in tools. (My stance is that this approach is misguided: Simply because a script can execute code does not mean it can bypass operating system security controls.)]

TLDR: Broken WSH script engine is not a problem unique to Syncthing Windows Setup and seems to have a number of root causes.

@Walter-o
Copy link

Walter-o commented May 1, 2024

I think this issue can be closed as it looks like there haven't been more affected people.

@Bill-Stewart
Copy link
Owner

This doesn't seem to be widespread and is likely caused by perhaps antimalware programs behaving incorrectly in some fashion. Not able to reproduce.

@Bill-Stewart Bill-Stewart closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants