How do I use Image File Executon Options registry key?

Questions about Wine on Linux
Locked
gnuser
Newbie
Newbie
Posts: 1
Joined: Tue May 21, 2024 1:09 pm

How do I use Image File Executon Options registry key?

Post by gnuser »

I'm trying to disable the sandbox of an Electron app launched by an executable. Electron programs have two possible command line arguments for that: -no-cef-sandbox and -no-sandbox. After searching on the Internet I found IFEO could be a solution. I wrote a .bat file which launches the original executable with the additional arguments and added an IFEO key into the registry with a "Debugger" value pointing to the .bat file. Launched the executable which then opens the Electron process but the sandbox is not removed. In the execution log of the Electron program the parameters do not appear either. It's like if the .bat file wasn't executed.

The .bat file first deletes the registry key to avoid a recursion, then executes the program and finally adds again the registry key. The contents of the .bat file are the following:

Code: Select all

:: EACefSubProcess.exe
@echo off
reg delete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\EACefSubProcess.exe" /v Debugger /f
%* -no-cef-sandbox -no-sandbox
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\EACefSubProcess.exe" /v Debugger /t REG_SZ /d "%0" /f

Is there something I'm missing?

Thanks in advance.
Locked