Sandboxie/SandboxiePlus/SandMan/Troubleshooting/Sandboxing/webcam.js

48 lines
1.4 KiB
JavaScript
Raw Normal View History

2023-07-01 18:32:18 +01:00
/*
* group: sandboxing
* class: sandboxing
2023-07-08 10:46:29 +01:00
* os_builds: 22000-99000
2023-07-01 18:32:18 +01:00
* name: Webcam or Sound does not work when sandboxed
* description: Description Text...
*
*/
2023-07-04 20:26:02 +01:00
let message = tr('To enable webcam support on Windows 11, the isolation level must be reduced. \n'+
'If you want to proceed, please press NEXT and select a sandbox to modify. \n');
2023-07-01 18:32:18 +01:00
if(!sbie.isCertValid())
2023-07-04 20:26:02 +01:00
message += tr('\nPlease note that this required preset works only with a valid supporter certificate!');
2023-07-01 18:32:18 +01:00
wizard.showStatus(message, true);
let form = [
{type: 'box', id: 'box'}
];
let data = wizard.showForm(form, tr('Select which box to turn into a reduced isolation app compartment box.'));
2023-07-01 18:32:18 +01:00
2023-07-08 10:46:29 +01:00
let boxName = data['box'];
let box = sbie.getBox(boxName);
2023-07-01 18:32:18 +01:00
box.setIniValue('NoSecurityIsolation', 'y');
box.appendIniValue('Template', 'OpenCOM');
box.setIniValue('DropAdminRights', 'y');
2023-07-08 10:46:29 +01:00
box.applyChanges();
{
sbie.setupTrace();
let form = [
{ id: 'yes', name: tr('Yes'), type: 'radio' },
{ id: 'no', name: tr('No'), type: 'radio' },
];
let ret = wizard.showForm(form, tr('The mitigation has been applied please try out the web cam in %1 and indicate if the issue has been resolved.', boxName));
if (ret['yes'] == true) {
wizard.setResult(true);
}
if (ret['no'] == true) {
wizard.setResult(false, 'Webcam mitigation not successfull');
// todo roll back changes
}
}