#1 2021-04-21 09:47

giovannibgr
Member
Registered: 2021-04-21
Posts: 2

"Failed to execute" error when trying to run sceensaver

I'm trying to replicate Windows' screensaver behavior in order to work around the stupid (IMHO) change that Microsoft made in Win 10, forcing all screensavers to run on a black screen. I don't like this for the "Bubbles" screensaver, as it looks sexier for the bubbles to fly over the contents on the screen.

So I found out that if I run the bubbles.scr as an executable, it still works as expected, and I decided to use Shutter's functionality to start it on user idle event.

The problem is that if I set Shutter to execute %systemroot%\system32\bubbles.scr /s, it shows an error:

Error: Failed to execute %systemroot%\system32\bubbles.scr /s : 2

I've tried executing it without the /s parameter, and also from a .bat script wrapper. The only difference was in the latter case - no error was shown (Status = "Finished"), but also no screensaver started.

Any idea what could the problem be?

Offline

#2 2021-04-21 10:23

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,115

Re: "Failed to execute" error when trying to run sceensaver

The error code "2", also known as ERROR_FILE_NOT_FOUND, means that the system simply can't find the specified file.

In summary, this issue is a result of inconsistent environments that Windows uses between 32-bit and 64-bit applications.

A simple way to call "Bubbles.scr" screensaver directly from Shutter is via the Run Program action with the following path:

C:\Windows\Sysnative\Bubbles.scr /S

Alternatively, if you wish to use environment variables, you can call it as follows:

cmd.exe /C %SystemRoot%\Sysnative\Bubbles.scr /S

You can find more background information on the underlying issue here:
"Msg" command not executable from Batch script

Offline

#3 2021-04-21 10:32

giovannibgr
Member
Registered: 2021-04-21
Posts: 2

Re: "Failed to execute" error when trying to run sceensaver

And I thought I knew Windows...
Thank you very much for the prompt and enlightening reply! smile

Offline

Board footer

Powered by FluxBB