-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CleanAfterReboot #4222
base: master
Are you sure you want to change the base?
CleanAfterReboot #4222
Conversation
The code does not compile, see failed CI runs. |
|
This will ensure that the deletion operation gets done reliably, especially if Sandman doesn't start itself at boot time. |
a722a4c
to
3b0d8c7
Compare
if(QMessageBox::question(this, tr("Sandboxie-Plus"), | ||
tr("Do you want to use Windows Delecting Feature(MoveFileEx)?Or we'll delete the box when Sandman.exe called by userinit.exe."), | ||
QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes){ | ||
if(MoveFileExW(fileRoot.toStdString().c_str(),NULL,4)==0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MoveFileExW->MoveFileExA
@DavidXanatos I have provided another clean option. |
auto pBoxEx = pBox.objectCast<CSandBoxPlus>(); | ||
QString fileRoot=pBoxEx->GetFileRoot(); | ||
if(QMessageBox::question(this, tr("Sandboxie-Plus"), | ||
tr("Do you want to make the box cleaned after machine reboot?"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tr("Do you want to make the box cleaned after machine reboot?"), | |
tr("Do you want the box to be cleaned after the machine reboots?"), |
tr("Do you want to make the box cleaned after machine reboot?"), | ||
QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes){ | ||
if(QMessageBox::question(this, tr("Sandboxie-Plus"), | ||
tr("Do you want to use Windows Delecting Feature(MoveFileEx)?Or we'll delete the box when Sandman.exe called by userinit.exe."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tr("Do you want to use Windows Delecting Feature(MoveFileEx)?Or we'll delete the box when Sandman.exe called by userinit.exe."), | |
tr("Do you want to use the Windows deleting function (MoveFileEx), or delete the box when SandMan.exe starts?"), |
QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes){ | ||
if(MoveFileExA(fileRoot.toStdString().c_str(),NULL,4)==0){ | ||
QMessageBox::warning(this, tr("Sandboxie-Plus"), | ||
tr("The operation failed,please make sure that Sandman has admin privliage.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tr("The operation failed,please make sure that Sandman has admin privliage.") | |
tr("The operation failed. Please make sure that SandMan has administrative privileges.") |
The PR provides a menu action to clean FileRootPath of a box after the machine reboot.