sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.68k stars 1.52k forks source link

JS failed: %windir%\sysnative\cmd.exe #1403

Closed pjarayuzu closed 2 years ago

pjarayuzu commented 2 years ago

Describe the bug Some software (e.g. AliDrive) use JS command %windir%\sysnative\cmd.exe /c %windir%\System32\REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography /v MachineGuid to get MachineGuid. It does not work.

image

To Reproduce Steps to reproduce the behavior: 1.Just Start it

System details and installed software

Software Link

Sandboxie configuration Installed inside the Sandboxie with default configuration.

DevSplash commented 2 years ago

Error: The system could not find the specified registry key or value

It looks like the following command failed to execute: %windir%\sysnative\cmd.exe /c %windir%\System32\REG.exe QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography /v MachineGuid(in 64-bit operating systems) The value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid cannot be read. It was incorrectly redirected to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Cryptography\MachineGuid, there is no such value here.


There seems to be another problem. In some cases nodejs in sandbox can't find cmd.exe when executing commands using child_process.

'C:\Windows\sysnative\cmd.exe' is not recognized as an internal or external command, operable program or batch file.

The reason is that %windir%\sysnative is not recognized in this case.

@DavidXanatos