├── .github
└── FUNDING.yml
├── images
├── logo_128.png
└── main_interface.png
├── src
├── ScoopBoxManager
│ ├── sbm.ico
│ ├── Resources
│ │ ├── add_24.png
│ │ ├── add_32.png
│ │ ├── open_32.png
│ │ ├── save_32.png
│ │ ├── remove_24.png
│ │ └── remove_32.png
│ ├── Enums
│ │ └── PackageManager.cs
│ ├── Models
│ │ ├── PackageManagerApplication.cs
│ │ └── AppSettings.cs
│ ├── Functions
│ │ ├── HelperFunctions.cs
│ │ ├── InterfaceManager.cs
│ │ └── SettingsManager.cs
│ ├── Program.cs
│ ├── Variables.cs
│ ├── ScoopBoxManager.csproj
│ ├── Forms
│ │ ├── AddApplication.cs
│ │ ├── AddMappedFolder.cs
│ │ ├── Main.resx
│ │ ├── AddApplication.resx
│ │ ├── AddMappedFolder.resx
│ │ ├── AddApplication.Designer.cs
│ │ ├── AddMappedFolder.Designer.cs
│ │ ├── Main.cs
│ │ └── Main.Designer.cs
│ └── Properties
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
└── ScoopBoxManager.sln
├── LICENSE.md
├── README.md
└── .gitignore
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: LAB02-Admin
2 | ko_fi: lab02research
3 |
--------------------------------------------------------------------------------
/images/logo_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/images/logo_128.png
--------------------------------------------------------------------------------
/images/main_interface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/images/main_interface.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/sbm.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/sbm.ico
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Resources/add_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/Resources/add_24.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Resources/add_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/Resources/add_32.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Resources/open_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/Resources/open_32.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Resources/save_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/Resources/save_32.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Resources/remove_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/Resources/remove_24.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Resources/remove_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LAB02-Research/ScoopBoxManager/HEAD/src/ScoopBoxManager/Resources/remove_32.png
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Enums/PackageManager.cs:
--------------------------------------------------------------------------------
1 | namespace ScoopBoxManager.Enums;
2 |
3 | public enum PackageManagerType
4 | {
5 | Scoop,
6 | Chocolatey
7 | }
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Models/PackageManagerApplication.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using ScoopBoxManager.Enums;
7 |
8 | namespace ScoopBoxManager.Models
9 | {
10 | public class PackageManagerApplication
11 | {
12 | public PackageManagerApplication()
13 | {
14 | //
15 | }
16 |
17 | public PackageManagerType PackageManager { get; set; } = PackageManagerType.Chocolatey;
18 | public string Package { get; set; } = string.Empty;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Functions/HelperFunctions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Microsoft.VisualBasic.Logging;
8 |
9 | namespace ScoopBoxManager.Functions
10 | {
11 | internal static class HelperFunctions
12 | {
13 | ///
14 | /// Launches the url with the system's default browser
15 | ///
16 | ///
17 | internal static void LaunchUrl(string url)
18 | {
19 | using (_ = Process.Start(new ProcessStartInfo(url) { UseShellExecute = true })) { }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Program.cs:
--------------------------------------------------------------------------------
1 | using ScoopBoxManager.Forms;
2 |
3 | namespace ScoopBoxManager
4 | {
5 | internal static class Program
6 | {
7 | ///
8 | /// The main entry point for the application.
9 | ///
10 | [STAThread]
11 | internal static void Main()
12 | {
13 | // prepare application
14 | Application.EnableVisualStyles();
15 | Application.SetCompatibleTextRenderingDefault(false);
16 |
17 | // set scaling
18 | Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
19 |
20 | // go
21 | Variables.MainForm = new Main();
22 | Application.Run(Variables.MainForm);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Variables.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using ScoopBoxManager.Forms;
7 |
8 | namespace ScoopBoxManager
9 | {
10 | internal static class Variables
11 | {
12 | ///
13 | /// Internal references
14 | ///
15 | internal static Main MainForm { get; set; }
16 |
17 | ///
18 | /// Internal variables
19 | ///
20 | internal static string SandboxRoot { get; } = "C:\\Users\\WDAGUtilityAccount\\Desktop";
21 |
22 | ///
23 | /// Local IO
24 | ///
25 | internal static string StartupPath { get; } = Path.GetDirectoryName(Application.ExecutablePath);
26 | internal static string ConfigPath { get; } = Path.Combine(StartupPath, "config");
27 | internal static string AppSettingsFile { get; } = Path.Combine(ConfigPath, "default_appsettings.json");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2022 LAB02 Research
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.1.32228.430
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScoopBoxManager", "ScoopBoxManager\ScoopBoxManager.csproj", "{4A83E129-7251-4DBC-B842-B651CF093166}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {4A83E129-7251-4DBC-B842-B651CF093166}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4A83E129-7251-4DBC-B842-B651CF093166}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {4A83E129-7251-4DBC-B842-B651CF093166}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {4A83E129-7251-4DBC-B842-B651CF093166}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | VisualSVNWorkingCopyRoot = .
24 | SolutionGuid = {71F77405-635E-4E47-A6D3-FB470BEE105C}
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/ScoopBoxManager.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net6.0-windows10.0.17763.0
6 | disable
7 | true
8 | enable
9 | sbm.ico
10 | 2022.5.13
11 | LAB02 Research
12 | Graphical interface for @hasan-hasanov's great ScoopBox, which in turn uses Windows' (also great) new Sandbox feature.
13 | MIT
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Form
28 |
29 |
30 | True
31 | True
32 | Resources.resx
33 |
34 |
35 |
36 |
37 |
38 | ResXFileCodeGenerator
39 | Resources.Designer.cs
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Forms/AddApplication.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using ScoopBoxManager.Enums;
11 | using ScoopBoxManager.Models;
12 |
13 | namespace ScoopBoxManager.Forms
14 | {
15 | public partial class AddApplication : Form
16 | {
17 | public PackageManagerApplication Application { get; set; } = null;
18 | public int ListviewIndex { get; set; } = -1;
19 |
20 | public AddApplication(PackageManagerApplication application, int listviewIndex)
21 | {
22 | Application = application;
23 | ListviewIndex = listviewIndex;
24 |
25 | InitializeComponent();
26 | }
27 |
28 | public AddApplication()
29 | {
30 | InitializeComponent();
31 | }
32 |
33 | ///
34 | /// Optionally loads the provided application
35 | ///
36 | ///
37 | ///
38 | private void Application_Load(object sender, EventArgs e)
39 | {
40 | // load enum
41 | CbPackageManager.DataSource = Enum.GetValues(typeof(PackageManagerType));
42 |
43 | if (Application == null) return;
44 |
45 | // load linked application
46 | CbPackageManager.Text = Application.PackageManager.ToString();
47 | TbApplication.Text = Application.Package;
48 | }
49 |
50 | ///
51 | /// Converts the settings to a PackageManagerApplication object
52 | ///
53 | ///
54 | ///
55 | private void BtnSave_Click(object sender, EventArgs e)
56 | {
57 | // get values
58 | var app = TbApplication.Text.Trim();
59 | var manager = Enum.Parse(CbPackageManager.SelectedValue.ToString() ?? "Scoop");
60 |
61 | // basic checks
62 | if (string.IsNullOrEmpty(app))
63 | {
64 | MessageBox.Show("Enter an application.", "ScoopBoxManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
65 | ActiveControl = TbApplication;
66 | return;
67 | }
68 |
69 | // optionally create new obj
70 | Application ??= new PackageManagerApplication();
71 |
72 | // map values
73 | Application.Package = app;
74 | Application.PackageManager = manager;
75 |
76 | // done!
77 | DialogResult = DialogResult.OK;
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Models/AppSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using ScoopBox;
7 | using ScoopBoxManager.Enums;
8 |
9 | namespace ScoopBoxManager.Models
10 | {
11 | public static class AppSettingsExtensions
12 | {
13 | ///
14 | /// Converts the AppSettings to a ScoopBox Options object
15 | ///
16 | ///
17 | ///
18 | public static IOptions ConvertToScoopBoxOptions(this AppSettings appSettings)
19 | {
20 | // set basic options
21 | var options = new Options
22 | {
23 | AudioInput = appSettings.AudioInput,
24 | VideoInput = appSettings.VideoInput,
25 | ProtectedClient = appSettings.ProtectedClient,
26 | PrinterRedirection = appSettings.PrinterRedirection,
27 | ClipboardRedirection = appSettings.ClipboardRedirection,
28 | MemoryInMB = appSettings.MemoryMb,
29 | Networking = appSettings.Networking,
30 | VGpu = appSettings.VGpu,
31 | };
32 |
33 | // set optional paths
34 | if (!string.IsNullOrEmpty(appSettings.SandboxConfigurationFile)) options.SandboxConfigurationFileName = appSettings.SandboxConfigurationFile;
35 | if (!string.IsNullOrEmpty(appSettings.RootfilesDirectoryLocation)) options.RootFilesDirectoryLocation = appSettings.RootfilesDirectoryLocation;
36 | if (!string.IsNullOrEmpty(appSettings.RootSandboxFilesDirectoryLocation)) options.RootSandboxFilesDirectoryLocation = appSettings.RootSandboxFilesDirectoryLocation;
37 |
38 | // set mapped folders
39 | if (appSettings.MappedFolders.Any()) options.UserMappedDirectories = appSettings.MappedFolders;
40 |
41 | // done
42 | return options;
43 | }
44 |
45 | ///
46 | /// Converts the AppSettings to a ChocolateyPackageManagerScript
47 | ///
48 | ///
49 | ///
50 | public static ChocolateyPackageManagerScript ConvertToChocolateyPackageManagerScript(this AppSettings appSettings)
51 | {
52 | var appList = appSettings.Applications.Where(x => x.PackageManager == PackageManagerType.Chocolatey).Select(app => app.Package).ToList();
53 | return !appList.Any() ? null : new ChocolateyPackageManagerScript(appList);
54 | }
55 |
56 | ///
57 | /// Converts the AppSettings to a ScoopPackageManagerScript
58 | ///
59 | ///
60 | ///
61 | public static ScoopPackageManagerScript ConvertToScoopPackageManagerScript(this AppSettings appSettings)
62 | {
63 | var appList = appSettings.Applications.Where(x => x.PackageManager == PackageManagerType.Scoop).Select(app => app.Package).ToList();
64 | return !appList.Any() ? null : new ScoopPackageManagerScript(appList);
65 | }
66 | }
67 |
68 | public class AppSettings
69 | {
70 | public AppSettings()
71 | {
72 | //
73 | }
74 |
75 | public string SandboxConfigurationFile { get; set; } = null;
76 | public string RootfilesDirectoryLocation { get; set; } = null;
77 | public string RootSandboxFilesDirectoryLocation { get; set; } = null;
78 | public AudioInputOptions AudioInput { get; set; } = AudioInputOptions.Default;
79 | public VideoInputOptions VideoInput { get; set; } = VideoInputOptions.Default;
80 | public ProtectedClientOptions ProtectedClient { get; set; } = ProtectedClientOptions.Default;
81 | public PrinterRedirectionOptions PrinterRedirection { get; set; } = PrinterRedirectionOptions.Default;
82 | public VGpuOptions VGpu { get; set; } = VGpuOptions.Enabled;
83 | public int MemoryMb { get; set; } = 0;
84 | public NetworkingOptions Networking { get; set; } = NetworkingOptions.Default;
85 | public ClipboardRedirectionOptions ClipboardRedirection { get; set; } = ClipboardRedirectionOptions.Default;
86 |
87 | public List MappedFolders { get; set; } = new();
88 | public List Applications { get; set; } = new();
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Forms/AddMappedFolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using ScoopBox;
11 |
12 | namespace ScoopBoxManager.Forms
13 | {
14 | public partial class AddMappedFolder : Form
15 | {
16 | public MappedFolder MappedFolder { get; set; } = null;
17 | public int ListviewIndex { get; set; } = -1;
18 |
19 | public AddMappedFolder(MappedFolder mappedFolder, int listviewIndex)
20 | {
21 | MappedFolder = mappedFolder;
22 | ListviewIndex = listviewIndex;
23 |
24 | InitializeComponent();
25 | }
26 |
27 | public AddMappedFolder()
28 | {
29 | InitializeComponent();
30 | }
31 |
32 | ///
33 | /// Optionally loads the provided mapped folder
34 | ///
35 | ///
36 | ///
37 | private void MappedFolder_Load(object sender, EventArgs e)
38 | {
39 | TbSandboxFolder.Text = Variables.SandboxRoot;
40 |
41 | if (MappedFolder == null) return;
42 |
43 | // load linked mapped folder
44 | TbHostFolder.Text = MappedFolder.HostFolder;
45 | TbSandboxFolder.Text = MappedFolder.SandboxFolder;
46 | CbReadOnly.Checked = MappedFolder.ReadOnly == "true";
47 | }
48 |
49 | ///
50 | /// Converts the settings to a MappedFolder object
51 | ///
52 | ///
53 | ///
54 | private void BtnSave_Click(object sender, EventArgs e)
55 | {
56 | // get values
57 | var hostFolder = TbHostFolder.Text.Trim();
58 | var sandboxFolder = TbSandboxFolder.Text.Trim();
59 | var ro = CbReadOnly.Checked ? "true" : "false";
60 |
61 | // basic checks
62 | if (string.IsNullOrEmpty(hostFolder))
63 | {
64 | MessageBox.Show("Enter a host folder (or doubleclick to select one).", "ScoopBoxManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
65 | ActiveControl = TbHostFolder;
66 | return;
67 | }
68 |
69 | if (string.IsNullOrEmpty(sandboxFolder))
70 | {
71 | MessageBox.Show("Enter a sandbox folder (or doubleclick to select one).", "ScoopBoxManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
72 | ActiveControl = TbSandboxFolder;
73 | return;
74 | }
75 |
76 | // optionally create new obj
77 | MappedFolder ??= new MappedFolder();
78 |
79 | // map values
80 | MappedFolder.HostFolder = hostFolder;
81 | MappedFolder.SandboxFolder = sandboxFolder;
82 | MappedFolder.ReadOnly = ro;
83 |
84 | // done!
85 | DialogResult = DialogResult.OK;
86 | }
87 |
88 | private void TbHostFolder_DoubleClick(object sender, EventArgs e)
89 | {
90 | using var dialog = new FolderBrowserDialog();
91 |
92 | dialog.ShowNewFolderButton = true;
93 | dialog.RootFolder = Environment.SpecialFolder.MyComputer;
94 |
95 | var result = dialog.ShowDialog();
96 | if (result != DialogResult.OK) return;
97 |
98 | TbHostFolder.Text = dialog.SelectedPath;
99 |
100 | // if sandbox folder starts with root, modify accordinly
101 | if (!TbSandboxFolder.Text.StartsWith(Variables.SandboxRoot)) return;
102 | var lastPart = Path.GetFileName(dialog.SelectedPath);
103 | TbSandboxFolder.Text = $"{Variables.SandboxRoot}\\{lastPart}";
104 | }
105 |
106 | private void TbHostFolder_TextChanged(object sender, EventArgs e)
107 | {
108 | // if sandbox folder starts with root, modify accordinly
109 | if (!TbSandboxFolder.Text.StartsWith(Variables.SandboxRoot)) return;
110 |
111 | // get the host folder, check for empty
112 | var hostfolder = TbHostFolder.Text.Trim();
113 | if (string.IsNullOrEmpty(hostfolder))
114 | {
115 | TbSandboxFolder.Text = $"{Variables.SandboxRoot}\\";
116 | return;
117 | }
118 |
119 | // set corresponding value
120 | var lastPart = hostfolder.Split('\\').Last();
121 | TbSandboxFolder.Text = $"{Variables.SandboxRoot}\\{lastPart}\\";
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/LAB02-Research/ScoopBoxManager/releases/)
2 | [](#license)
3 | [](https://www.microsoft.com/ "Go to Microsoft homepage")
4 | 
5 | [](https://www.buymeacoffee.com/lab02research)
6 |
7 |
8 |
9 |
10 |
11 | # ScoopBox Manager
12 |
13 | ScoopBox Manager is a Windows-based application to prepare and launch [Windows Sandbox](https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview) instances, developed in .NET 6.
14 |
15 | Click [here](https://github.com/LAB02-Research/ScoopBoxManager/releases/latest/download/ScoopBoxManager.zip) to download the latest release.
16 |
17 | ----
18 |
19 | Before starting, make sure you have [Windows Sandbox](https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview) enabled. For more info [consult the docs](https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview#installation), or use this PS script:
20 |
21 | ```powershell
22 | Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online
23 | ```
24 |
25 | ----
26 |
27 | [Windows Sandbox](https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview) is a way to launch applications, visit websites, test code, etc. within a secure and clean environment. This environment is a basic copy of your OS, running as a virtual machine. As soon as you close the sandbox, everything you've done and changed will be gone. Open a new one, and you'll get a fresh new copy.
28 |
29 | That's also a bit of a setback: if you need some applications or frameworks installed for your tests, you'd have to reinstall them every time you launch a new sandbox. Or what if you want to access a local folder, for instance your application's debug output path?
30 |
31 | [@hasan-hasanov](https://github.com/hasan-hasanov) created a perfect library to deal with that; [ScoopBox](https://github.com/hasan-hasanov/ScoopBox). It allows a developer to configure certain settings, and have the sandbox install predefined applications through the package managers [Scoop](https://scoop.sh) and [Chocolatey](https://chocolatey.org/).
32 |
33 | For those that aren't C# programmers, or if you want an easy way to configure your sandboxes (like me), I built a small graphical interface around [ScoopBox](https://github.com/hasan-hasanov/ScoopBox):
34 |
35 | 
36 |
37 | It should be pretty self-explanatory, and you can find more info on the various settings in the [ScoopBox readme](https://github.com/hasan-hasanov/ScoopBox#how-scoopbox-works), but I'll expand on some parts:
38 |
39 | ### General configuration
40 |
41 | The defaults are fine, but you can for instance disable networking to see how your applications handles it. When setting memory, 0 means the default.
42 |
43 | ### Optional configuration
44 |
45 | These are configured by [ScoopBox](https://github.com/hasan-hasanov/ScoopBox), so there's usually no reason to change these.
46 |
47 | ### Mapped folders
48 |
49 | These are local folders that will show up in your sandbox, optionally readonly for added safety if you're testing potential malware.
50 |
51 | ### Applications
52 |
53 | A list of packages that will be installed. You can define which package manager per package; [Scoop](https://scoop.sh) or [Chocolatey](https://chocolatey.org/). Please note that you need networking enabled for this, and depending on which and the amount of packages, it might take a few moments before everything's installed.
54 |
55 | ### Storage
56 |
57 | You can use the two buttons on the bottom-right to store and load multiple configurations. Whenever you launch a sandbox, the active settings are stored as the default (and loaded when you restart). So if it's just one set of config you use, you don't have to use them.
58 |
59 | ### Logging
60 |
61 | [ScoopBox](https://github.com/hasan-hasanov/ScoopBox) writes logfiles to the desktop of your sandbox. They contain info on what the package managers did, so if something's not installing, check those first.
62 |
63 | ---
64 |
65 | If you need a cli tool to launch sandboxes, [@hasan-hasanov](https://github.com/hasan-hasanov) built that as well: [Boxer](https://github.com/hasan-hasanov/Boxer)
66 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Forms/Main.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
61 |
62 |
63 | AAABAAEAICAAAAEAIADVBAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAAFz
64 | UkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEaklEQVRYR+1WfUyV
65 | VRx+CvCDUjPJO76CvLvMYCZJMWk6zKyGimsR2togR6lRm4ymJmMWuO6iYjgamkU6dX1YbY4tN6GWdZcK
66 | QRRKOLQwCYFAviEEEeo8v73v5YX7XrhrFX/Us92d95z7nvf3nOc8v985N90Xl/wHphA3a+2U4X8CkxKI
67 | iVqE3du2IPreCG1kYtw2exYy01Kwcf1abWRieGxC35kzMHPGdDy07H7ELl2C0GB/zPe7Xf5r7+xGQ1ML
68 | TlecRYmjDM0tbTLuCTwiMOsWX6Q8uQ7r41dh2jQfXLz0K6prf0ZHZw98fLxhDQ3CooVWWf3w8DBOnDyD
69 | gkOfCrHJMCmBu213IXfXVlntl6c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d2U
82 | AvHGviM4VV4l42ZweyF5JHapOg/KxtyI2M8/8LEz0HjwnacT18jVjdvBG1F51Xk5U2hkM/ylOyEJXFBG
83 | q1eyXxsYxJzZt0q68RCj1H/rndAIVrMpuRX/k3CbBf8W/usEgD8B3es0Hn532FcAAAAASUVORK5CYII=
84 |
85 |
86 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Forms/AddApplication.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
61 |
62 |
63 | AAABAAEAICAAAAEAIADVBAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAAFz
64 | UkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEaklEQVRYR+1WfUyV
65 | VRx+CvCDUjPJO76CvLvMYCZJMWk6zKyGimsR2togR6lRm4ymJmMWuO6iYjgamkU6dX1YbY4tN6GWdZcK
66 | QRRKOLQwCYFAviEEEeo8v73v5YX7XrhrFX/Us92d95z7nvf3nOc8v985N90Xl/wHphA3a+2U4X8CkxKI
67 | iVqE3du2IPreCG1kYtw2exYy01Kwcf1abWRieGxC35kzMHPGdDy07H7ELl2C0GB/zPe7Xf5r7+xGQ1ML
68 | TlecRYmjDM0t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82bbM7s4jm5YHmrYjSvMaS
81 | boRXgG1xlvY8BiMjI6i5cElKKdPqB+WLxt+uYujGDZR8XYYflS+a1NXrl4ZGkfctdejowXmQFby6Xd2U
82 | AvHGviM4VV4l42ZweyF5JHapOg/KxtyI2M8/8LEz0HjwnacT18jVjdvBG1F51Xk5U2hkM/ylOyEJXFBG
83 | q1eyXxsYxJzZt0q68RCj1H/rndAIVrMpuRX/k3CbBf8W/usEgD8B3es0Hn532FcAAAAASUVORK5CYII=
84 |
85 |
86 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Forms/AddMappedFolder.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
61 |
62 |
63 | AAABAAEAICAAAAEAIADVBAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAAFz
64 | UkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEaklEQVRYR+1WfUyV
65 | VRx+CvCDUjPJO76CvLvMYCZJMWk6zKyGimsR2togR6lRm4ymJmMWuO6iYjgamkU6dX1YbY4tN6GWdZcK
66 | QRRKOLQwCYFAviEEEeo8v73v5YX7XrhrFX/Us92d95z7nvf3nOc8v985N90Xl/wHphA3a+2U4X8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NUzYfWDcjh9cKxYGxkLUwJkzw8lJcTJ4WMMHuxv
80 | cRucmcKU1cFq+sLGRFm5uxPRlACRvacQg0NDyMtKlz6Ds7xWVtfijMkZz/82bbM7s4jm5YHmrYjSvMaS
81 | boRXgG1xlvY8BiMjI6i5cElKKdPqB+WLxt+uYujGDZR8XYYflS+a1NXrl4ZGkfctdejowXmQFby6Xd2U
82 | AvHGviM4VV4l42ZweyF5JHapOg/KxtyI2M8/8LEz0HjwnacT18jVjdvBG1F51Xk5U2hkM/ylOyEJXFBG
83 | q1eyXxsYxJzZt0q68RCj1H/rndAIVrMpuRX/k3CbBf8W/usEgD8B3es0Hn532FcAAAAASUVORK5CYII=
84 |
85 |
86 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ScoopBoxManager.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ScoopBoxManager.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap add_24 {
67 | get {
68 | object obj = ResourceManager.GetObject("add_24", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap add_32 {
77 | get {
78 | object obj = ResourceManager.GetObject("add_32", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Bitmap.
85 | ///
86 | internal static System.Drawing.Bitmap open_32 {
87 | get {
88 | object obj = ResourceManager.GetObject("open_32", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// Looks up a localized resource of type System.Drawing.Bitmap.
95 | ///
96 | internal static System.Drawing.Bitmap remove_24 {
97 | get {
98 | object obj = ResourceManager.GetObject("remove_24", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// Looks up a localized resource of type System.Drawing.Bitmap.
105 | ///
106 | internal static System.Drawing.Bitmap remove_32 {
107 | get {
108 | object obj = ResourceManager.GetObject("remove_32", resourceCulture);
109 | return ((System.Drawing.Bitmap)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// Looks up a localized resource of type System.Drawing.Bitmap.
115 | ///
116 | internal static System.Drawing.Bitmap save_32 {
117 | get {
118 | object obj = ResourceManager.GetObject("save_32", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/src/ScoopBoxManager/Functions/InterfaceManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using ScoopBoxManager.Models;
7 |
8 | namespace ScoopBoxManager.Functions
9 | {
10 | internal static class InterfaceManager
11 | {
12 | ///
13 | /// Shows the provided AppSettings in the GUI
14 | ///
15 | ///
16 | internal static void ShowAppSettings(AppSettings appSettings)
17 | {
18 | Variables.MainForm.Invoke(delegate
19 | {
20 | // set IO locations
21 | Variables.MainForm.TbSandboxConfigurationFile.Text = appSettings.SandboxConfigurationFile;
22 | Variables.MainForm.TbRootfilesDirectory.Text = appSettings.RootfilesDirectoryLocation;
23 | Variables.MainForm.TbRootSandboxFilesDirectory.Text = appSettings.RootfilesDirectoryLocation;
24 |
25 | // set comboboxes
26 | Variables.MainForm.CbAudioInput.Text = appSettings.AudioInput.ToString();
27 | Variables.MainForm.CbVideoInput.Text = appSettings.VideoInput.ToString();
28 | Variables.MainForm.CbProtectedClient.Text = appSettings.ProtectedClient.ToString();
29 | Variables.MainForm.CbPrinterRedirection.Text = appSettings.PrinterRedirection.ToString();
30 | Variables.MainForm.CbVgpu.Text = appSettings.VGpu.ToString();
31 | Variables.MainForm.CbNetworking.Text = appSettings.Networking.ToString();
32 | Variables.MainForm.CbClipboardRedirection.Text = appSettings.ClipboardRedirection.ToString();
33 |
34 | // set memory
35 | Variables.MainForm.NumMemory.Value = appSettings.MemoryMb;
36 |
37 | // set mapped folders
38 | Variables.MainForm.LvMappedFolders.BeginUpdate();
39 | foreach (var mappedFolder in appSettings.MappedFolders)
40 | {
41 | var mappedFolderItem = new ListViewItem(mappedFolder.HostFolder);
42 | mappedFolderItem.SubItems.Add(mappedFolder.SandboxFolder);
43 | mappedFolderItem.SubItems.Add(mappedFolder.ReadOnly);
44 |
45 | Variables.MainForm.LvMappedFolders.Items.Add(mappedFolderItem);
46 | }
47 | Variables.MainForm.LvMappedFolders.EndUpdate();
48 |
49 | // set apps
50 | Variables.MainForm.LvApplications.BeginUpdate();
51 | foreach (var app in appSettings.Applications)
52 | {
53 | var appItem = new ListViewItem(app.Package);
54 | appItem.SubItems.Add(app.PackageManager.ToString());
55 |
56 | Variables.MainForm.LvApplications.Items.Add(appItem);
57 | }
58 | Variables.MainForm.LvApplications.EndUpdate();
59 |
60 | // done
61 | });
62 | }
63 |
64 | ///
65 | /// Sets all interface elements enabled to false
66 | ///
67 | internal static void LockUi()
68 | {
69 | Variables.MainForm.Invoke(delegate
70 | {
71 | foreach (var textBox in Variables.MainForm.Controls.OfType()) textBox.Enabled = false;
72 | foreach (var button in Variables.MainForm.Controls.OfType