Comments (5)
Can you specify how and where to set "NoDrive"? I fail to reproduce your issue.
from seb-win-refactoring.
To hide a drive it is necessary to set a registry entry "NoDrives" (also via GPO):
https://winaero.com/blog/hide-drive-windows-10-file-explorer/
So that the file explorer of the SEB can also implement this, it would be necessary to query whether NoDrives exists under the Explorer in the registry and which value is set.
from seb-win-refactoring.
@dbuechel We have fixed this issue in our fork in FileSystemDialog.xaml.cs and commented our edits with 'uni-goettingen-patch: start' and 'uni-goettingen-patch: end'
Should we create a pull, or do you want to add it directly?
// uni-goettingen-patch: start
using Microsoft.Win32;
// uni-goettingen-patch: end
namespace SafeExamBrowser.UserInterface.Desktop.Windows
{
internal partial class FileSystemDialog : Window
{
// uni-goettingen-patch: begin
private DriveInfo[] GetDrives(bool showAll = false)
{
var drives = DriveInfo.GetDrives();
int noDrives = (int)Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", "NoDrives", 0);
if (noDrives > 0 || showAll)
{
return drives.Where(drive => (noDrives & (int)(Math.Pow(2, (int)(drive.RootDirectory.ToString()[0]) - 65))) == 0).ToArray();
}
return drives;
}
// uni-goettingen-patch: end
private void InitializeFileSystem()
{
// uni-goettingen-patch: begin
foreach (var drive in GetDrives())
// uni-goettingen-patch: end
{
FileSystem.Items.Add(CreateItem(drive.RootDirectory));
}
if (FileSystem.HasItems && FileSystem.Items[0] is TreeViewItem item)
{
item.IsSelected = true;
}
if (!string.IsNullOrEmpty(initialPath))
{
var root = Path.GetPathRoot(initialPath);
var path = initialPath.Replace(root, "").Split(Path.DirectorySeparatorChar);
var segments = new List<string> { root };
segments.AddRange(path);
SelectInitialPath(FileSystem.Items, segments);
if (element == FileSystemElement.File && operation == FileSystemOperation.Save)
{
NewElementName.Text = Path.GetFileName(initialPath);
}
}
}
}
}
from seb-win-refactoring.
Ah, great! Yes, please create a pull request.
from seb-win-refactoring.
Fixed with pull request #29
from seb-win-refactoring.
Related Issues (20)
- Show pasword button (eye icon) HOT 1
- Source Code anti tamper when running the application. HOT 2
- Issue I'm getting with my students when using Take a test HOT 2
- Feature: Battery Status API HOT 1
- In Moodle, the cookie can have a prefix. If one is set, the session sent to SEB server is not correct. HOT 15
- Periodic reload + kiosk message window on LMS page HOT 3
- Unmute sound after starting SEB HOT 1
- Add multiple files from USB drive at once HOT 1
- installation bug HOT 1
- Error for install SEB
- SEB - Office Programms - EntraID(AzureAD) 2FA HOT 3
- Prohibited Display Configuration HOT 1
- SEB Failed to start please consult the log files for more information SEB version 3.7.0 HOT 4
- SEB Failed to Launch HOT 4
- SEB Failed to Start New Session HOT 1
- Session Start Error HOT 1
- Cant choose organisation when starting SEB - Blank White Window HOT 3
- cant detect droidcam HOT 2
- SEB Initializing Kiosk Mode keep flashing when in the browser. HOT 6
- SEB - An expected error occured while trying to load configuration resource HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seb-win-refactoring.