Skip to content

Commit

Permalink
1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos authored and isaak654 committed Jul 28, 2022
1 parent 9ee30f0 commit 668b9c3
Show file tree
Hide file tree
Showing 18 changed files with 409 additions and 64 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).



## [1.3.0 / 5.58.0] - 2022-07-?
## [1.2.7 / 5.57.7] - 2022-07-??

### Changed
- SandboxieLogon is now disabled by default as it was not compatible with 3rd party antimalware tools [#2025](https://github.com/sandboxie-plus/Sandboxie/issues/2025)
- the access view list now adds in display the tailing * to file and key paths the same way the driver does [2039](https://github.com/sandboxie-plus/Sandboxie/issues/2039)
- setup of shell integration is now done by sandman, no longer by the installer
- uninstaler can now remove the sandbox folders [#1235](https://github.com/sandboxie-plus/Sandboxie/pull/1235)




## [1.2.6 / 5.57.6] - 2022-07-25

Expand Down
66 changes: 42 additions & 24 deletions Installer/Sandboxie-Plus.iss
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ PrivilegesRequiredOverridesAllowed=commandline

[Tasks]
Name: "DesktopIcon"; Description: "{cm:CreateDesktopIcon}"; MinVersion: 0.0,5.0; Check: not IsPortable
Name: "DesktopIcon2"; Description: "{cm:AddSandboxedBrowser}"; MinVersion: 0.0,5.0; Check: not IsPortable
Name: "AutoStartEntry"; Description: "{cm:AutoStartProgram,{#MyAppName}}"; MinVersion: 0.0,5.0; Check: not IsPortable
Name: "AddRunSandboxed"; Description: "{cm:AddSandboxedMenu}"; MinVersion: 0.0,5.0; Check: not IsPortable
;Name: "DesktopIcon2"; Description: "{cm:AddSandboxedBrowser}"; MinVersion: 0.0,5.0; Check: not IsPortable
;Name: "AutoStartEntry"; Description: "{cm:AutoStartProgram,{#MyAppName}}"; MinVersion: 0.0,5.0; Check: not IsPortable
;Name: "AddRunSandboxed"; Description: "{cm:AddSandboxedMenu}"; MinVersion: 0.0,5.0; Check: not IsPortable


[Files]
; Both portable and install.
Source: ".\Release\{#MyAppSrc}\*"; DestDir: "{app}"; MinVersion: 0.0,5.0; Flags: recursesubdirs ignoreversion; Excludes: "*.pdb"
; include the driver pdb
;Source: ".\Release\{#MyAppSrc}\SbieDrv.pdb"; DestDir: "{app}"; MinVersion: 0.0,5.0; Flags: ignoreversion
Source: ".\Release\{#MyAppSrc}\SbieDrv.pdb"; DestDir: "{app}"; MinVersion: 0.0,5.0; Flags: ignoreversion

; Only if portable.
Source: ".\Sandboxie.ini"; DestDir: "{app}"; Flags: ignoreversion onlyifdoesntexist; Check: IsPortable
Expand All @@ -66,7 +66,7 @@ Name: "{group}\{cm:SandboxieStartMenu1}"; Filename: "{app}\Start.exe"; Parameter
Name: "{group}\{cm:SandboxieStartMenu2}"; Filename: "{app}\Start.exe"; Parameters: "default_browser"; MinVersion: 0.0,5.0
Name: "{group}\{cm:SandboxieStartMenu3}"; Filename: "{app}\Start.exe"; Parameters: "/box:__ask__ start_menu"; MinVersion: 0.0,5.0
Name: "{userdesktop}\Sandboxie-Plus"; Filename: "{app}\SandMan.exe"; Tasks: DesktopIcon; MinVersion: 0.0,5.0
Name: "{userdesktop}\{cm:SandboxedBrowser}"; Filename: "{app}\Start.exe"; Parameters: "default_browser"; Tasks: DesktopIcon2; MinVersion: 0.0,5.0
;Name: "{userdesktop}\{cm:SandboxedBrowser}"; Filename: "{app}\Start.exe"; Parameters: "default_browser"; Tasks: DesktopIcon2; MinVersion: 0.0,5.0


[INI]
Expand All @@ -81,23 +81,25 @@ Type: files; Name: "{app}\translations\sandman_zh-CN.qm"
Type: files; Name: "{app}\translations\sandman_zh-TW.qm"
Type: files; Name: "{app}\translations\sandman_pt.qm"
Type: files; Name: "{app}\translations\sandman_ua.qm"
Type: files; Name: "{app}\SbieDrv.sys.w10"
Type: files; Name: "{app}\SbieDrv.sys.rc4"


[Registry]
; Autostart Sandman.
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueName: "SandboxiePlus_AutoRun"; ValueType: string; ValueData: """{app}\SandMan.exe"" -autorun"; Flags: uninsdeletevalue; Tasks: AutoStartEntry
;Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueName: "SandboxiePlus_AutoRun"; ValueType: string; ValueData: """{app}\SandMan.exe"" -autorun"; Flags: uninsdeletevalue; Tasks: AutoStartEntry

; AddRunSandboxed all files.
Root: HKCU; Subkey: "Software\Classes\*\shell"; Flags: uninsdeletekeyifempty; Tasks: AddRunSandboxed
Root: HKCU; Subkey: "Software\Classes\*\shell\sandbox"; ValueName: ""; ValueType: string; ValueData: "{cm:RunSandboxedMenu}"; Flags: uninsdeletekey; Tasks: AddRunSandboxed
Root: HKCU; Subkey: "Software\Classes\*\shell\sandbox"; ValueName: "Icon"; ValueType: string; ValueData: """{app}\start.exe"""; Tasks: AddRunSandboxed
Root: HKCU; Subkey: "Software\Classes\*\shell\sandbox\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SandMan.exe"" /box:__ask__ ""%1"" %*"; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\*\shell"; Flags: uninsdeletekeyifempty; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\*\shell\sandbox"; ValueName: ""; ValueType: string; ValueData: "{cm:RunSandboxedMenu}"; Flags: uninsdeletekey; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\*\shell\sandbox"; ValueName: "Icon"; ValueType: string; ValueData: """{app}\start.exe"""; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\*\shell\sandbox\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SandMan.exe"" /box:__ask__ ""%1"" %*"; Tasks: AddRunSandboxed

; AddRunSandboxed folder.
Root: HKCU; Subkey: "Software\Classes\Folder\shell"; Flags: uninsdeletekeyifempty; Tasks: AddRunSandboxed
Root: HKCU; Subkey: "Software\Classes\Folder\shell\sandbox"; ValueName: ""; ValueType: string; ValueData: "{cm:RunSandboxedMenu}"; Flags: uninsdeletekey; Tasks: AddRunSandboxed
Root: HKCU; Subkey: "Software\Classes\Folder\shell\sandbox"; ValueName: "Icon"; ValueType: string; ValueData: """{app}\start.exe"""; Tasks: AddRunSandboxed
Root: HKCU; Subkey: "Software\Classes\Folder\shell\sandbox\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SandMan.exe"" /box:__ask__ ""%1"" %*"; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\Folder\shell"; Flags: uninsdeletekeyifempty; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\Folder\shell\sandbox"; ValueName: ""; ValueType: string; ValueData: "{cm:RunSandboxedMenu}"; Flags: uninsdeletekey; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\Folder\shell\sandbox"; ValueName: "Icon"; ValueType: string; ValueData: """{app}\start.exe"""; Tasks: AddRunSandboxed
;Root: HKCU; Subkey: "Software\Classes\Folder\shell\sandbox\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SandMan.exe"" /box:__ask__ ""%1"" %*"; Tasks: AddRunSandboxed

; External manifest for Sbie service.
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\SbieSvc"; ValueName: "PreferExternalManifest"; ValueType: dword; ValueData: "1"; Check: not IsPortable
Expand All @@ -122,8 +124,6 @@ Filename: "{app}\SandMan.exe"; StatusMsg: "Launch SandMan UI..."; Flags: postins


[UninstallDelete]
Type: files; Name: "{app}\SbieDrv.sys.w10"
Type: files; Name: "{app}\SbieDrv.sys.rc4"
Type: dirifempty; Name: "{app}"
Type: dirifempty; Name: "{localappdata}\{#MyAppName}"

Expand Down Expand Up @@ -465,8 +465,8 @@ begin
exit;
// Require Sandman.exe to continue.
if not FileExists(ExpandConstant('{app}\Sandman.exe')) then
exit;
//if not FileExists(ExpandConstant('{app}\Sandman.exe')) then
// exit;
// Make a list.
Paths := TStringList.Create;
Expand Down Expand Up @@ -513,14 +513,14 @@ begin
IDNO: TaskRet := 2;
end;
if TaskRet > 1 then begin
Log('Debug: Taskkill /IM Sandman.exe /F');
Exec(ExpandConstant('{sys}\taskkill.exe'), '/IM Sandman.exe /F', '', SW_HIDE, ewWaitUntilTerminated, ExecRet);
if TaskRet > 2 then begin
Log('Debug: Start terminate_all');
Exec(ExpandConstant('{app}\start.exe'), 'terminate_all', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ExecRet);
end;
if TaskRet > 2 then begin
Log('Debug: Sandman /RemoveSandboxes');
Exec(ExpandConstant('{app}\Sandman.exe'), '/RemoveSandboxes', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ExecRet);
Log('Debug: Start delete_all_sandboxes');
Exec(ExpandConstant('{app}\start.exe'), 'delete_all_sandboxes', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ExecRet);
end;
if TaskRet > 1 then begin
Expand All @@ -536,6 +536,20 @@ begin
Paths.Free;
end;
procedure ShellUninstall();
var
ExecRet: Integer;
begin
if FileExists(ExpandConstant('{app}\Sandman.exe')) then begin
Log('Debug: SandMan /ShellUninstall');
Exec(ExpandConstant('{app}\Sandman.exe'), '/ShellUninstall', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ExecRet);
end else begin
Log('Debug: SbieCtrl /uninstall');
Exec(ExpandConstant('{app}\sbiectrl.exe'), '/uninstall', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ExecRet);
end;
end;
//////////////////////////////////////////////////////
// Uninstallation Events
Expand All @@ -551,12 +565,16 @@ begin
// User to confirm extra files to remove.
if not UninstallSilent then
UninstallCleanup(2);
UninstallCleanup(3);
// Shutdown service, driver and processes.
if (ShutdownSbie() = False) then
begin
Abort();
exit;
end;
// remove shell integration.
ShellUninstall();
end;
2 changes: 1 addition & 1 deletion Sandboxie/apps/control/DeleteDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void CDeleteDialog::OnOK()
WCHAR cmd[64];
wcscpy(cmd, L"delete_sandbox");
//if (m_AutoDelete)
//wcscat(cmd, L"_silent");
// wcscat(cmd, L"_silent");
CMyApp::RunStartExe(cmd, BoxName, TRUE);

box.GetBoxFile().RebuildSkeletonTree();
Expand Down
4 changes: 4 additions & 0 deletions Sandboxie/apps/control/MyApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ BOOL CMyApp::InitInstance()
ForceVisible = TRUE;
if (wcsstr(CommandLine, L"/sync"))
ForceSync = TRUE;
if (wcsstr(CommandLine, L"/uninstall")) {
CShellDialog::Sync(TRUE);
return TRUE;
}
}

//
Expand Down
40 changes: 22 additions & 18 deletions Sandboxie/apps/control/ShellDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void CShellDialog::OnCloseOrCancel()
//---------------------------------------------------------------------------


void CShellDialog::Sync()
void CShellDialog::Sync(BOOL bUninstall)
{
//
// initialize Shell exports (Visual C++ 6.0)
Expand All @@ -295,11 +295,11 @@ void CShellDialog::Sync()
// sync
//

SyncRunLogon();
SyncBrowserIcon(_AddDesktopIcon, CSIDL_DESKTOPDIRECTORY, CString());
SyncBrowserIcon(_AddQuickLaunchIcon, CSIDL_APPDATA, _QuickLaunch);
SyncContextMenu();
SyncSendToMenu();
SyncRunLogon(bUninstall);
SyncBrowserIcon(_AddDesktopIcon, CSIDL_DESKTOPDIRECTORY, CString(), bUninstall);
SyncBrowserIcon(_AddQuickLaunchIcon, CSIDL_APPDATA, _QuickLaunch, bUninstall);
SyncContextMenu(bUninstall);
SyncSendToMenu(bUninstall);
}


Expand All @@ -308,7 +308,7 @@ void CShellDialog::Sync()
//---------------------------------------------------------------------------


void CShellDialog::SyncRunLogon()
void CShellDialog::SyncRunLogon(BOOL bUninstall)
{
static const WCHAR *_RunKey =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Run";
Expand All @@ -318,8 +318,9 @@ void CShellDialog::SyncRunLogon()
// query ini setting and actual registry information
//

BOOL ini;
CUserSettings::GetInstance().GetBool(_EnableLogonStart, ini, TRUE);
BOOL ini = FALSE;
if(!bUninstall)
CUserSettings::GetInstance().GetBool(_EnableLogonStart, ini, TRUE);

HKEY hkey;
LONG rc = RegOpenKeyEx(HKEY_CURRENT_USER, _RunKey, 0, KEY_READ, &hkey);
Expand Down Expand Up @@ -377,7 +378,7 @@ void CShellDialog::SyncRunLogon()
//---------------------------------------------------------------------------


void CShellDialog::SyncContextMenu()
void CShellDialog::SyncContextMenu(BOOL bUninstall)
{
static const WCHAR *_star = L"*";
static const WCHAR *_folder = L"Folder";
Expand All @@ -386,8 +387,9 @@ void CShellDialog::SyncContextMenu()
// query ini setting and actual registry information
//

BOOL ini;
CUserSettings::GetInstance().GetBool(_AddContextMenu, ini, TRUE);
BOOL ini = FALSE;
if(!bUninstall)
CUserSettings::GetInstance().GetBool(_AddContextMenu, ini, TRUE);
BOOL reg = FALSE;

ULONG type;
Expand Down Expand Up @@ -718,14 +720,15 @@ void CShellDialog::DeleteAssoc(WCHAR *path, const WCHAR *classname)


void CShellDialog::SyncBrowserIcon(
const CString &setting, int nFolder, const CString &subdir)
const CString &setting, int nFolder, const CString &subdir, BOOL bUninstall)
{
//
// query ini setting and actual filesystem information
//

BOOL ini;
CUserSettings::GetInstance().GetBool(setting, ini, TRUE);
BOOL ini = FALSE;
if(!bUninstall)
CUserSettings::GetInstance().GetBool(setting, ini, TRUE);

WCHAR path[512];
HRESULT hr = SHGetFolderPathW(
Expand Down Expand Up @@ -774,15 +777,16 @@ void CShellDialog::SyncBrowserIcon(
//---------------------------------------------------------------------------


void CShellDialog::SyncSendToMenu()
void CShellDialog::SyncSendToMenu(BOOL bUninstall)
{
if (CMyApp::m_WindowsVista) {
SyncSendToMenuVista();
return;
}

BOOL ini;
CUserSettings::GetInstance().GetBool(_AddSendToMenu, ini, TRUE);
BOOL ini = FALSE;
if(!bUninstall)
CUserSettings::GetInstance().GetBool(_AddSendToMenu, ini, TRUE);

WCHAR path[512];
HRESULT hr = SHGetFolderPathW(
Expand Down
10 changes: 5 additions & 5 deletions Sandboxie/apps/control/ShellDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class CShellDialog : public CBaseDialog

afx_msg void OnCloseOrCancel();

static void SyncRunLogon();
static void SyncRunLogon(BOOL bUninstall = FALSE);
static void SyncSendToMenuVista();

static void CreateAssoc(WCHAR *path, const WCHAR *classname);
static void DeleteAssoc(WCHAR *path, const WCHAR *classname);

static void SyncBrowserIcon(
const CString &setting, int nFolder, const CString &subdir);
const CString &setting, int nFolder, const CString &subdir, BOOL bUninstall = FALSE);

static BOOL GetStartMenuShortcut(
CString &BoxName, CString &LinkPath,
Expand All @@ -68,9 +68,9 @@ class CShellDialog : public CBaseDialog
CShellDialog(CWnd *pParentWnd);
~CShellDialog();

static void Sync();
static void SyncContextMenu();
static void SyncSendToMenu();
static void Sync(BOOL bUninstall = FALSE);
static void SyncContextMenu(BOOL bUninstall = FALSE);
static void SyncSendToMenu(BOOL bUninstall = FALSE);

static void CreateShortcut(CString BoxName, CString LinkPath);

Expand Down
8 changes: 4 additions & 4 deletions Sandboxie/apps/start/Start.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib</AdditionalDependencies>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib;Gdiplus.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>_MSC_VER=1200;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -97,7 +97,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib</AdditionalDependencies>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib;Gdiplus.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>_MSC_VER=1200;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -109,7 +109,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SbieRelease|Win32'">
<ClCompile />
<Link>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib</AdditionalDependencies>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib;Gdiplus.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>_MSC_VER=1200;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -125,7 +125,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SbieRelease|x64'">
<ClCompile />
<Link>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib</AdditionalDependencies>
<AdditionalDependencies>libvcruntime.lib;libucrt.lib;ntdll.lib;User32.lib;Shell32.lib;Shlwapi.lib;Kernel32.lib;Gdi32.lib;SbieDll.lib;Ole32.lib;Common.lib;Advapi32.lib;Comctl32.lib;Comdlg32.lib;uuid.lib;Gdiplus.lib</AdditionalDependencies>
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
</Link>
<ResourceCompile>
Expand Down

0 comments on commit 668b9c3

Please sign in to comment.