feat(RDPSign): opdatér Get-DesktopPaths til OneDrive Desktop
- Erstat Join-Path/Test-Path med Get-ChildItem -Filter "Desktop" -Depth 2
så OneDrive-omdirigeret Desktop også fanges
- Tilføj -Exclude "Public","Default" for at springe systemprofiler over
- Anvendt i app/Install.ps1, Detect.ps1, Uninstall.ps1, SignOnly.ps1,
SignOnly_detect.ps1, Clearsigning.ps1, sandbox.ps1
This commit is contained in:
@@ -13,15 +13,14 @@ param(
|
||||
|
||||
function Get-DesktopPaths {
|
||||
if ($AllUsers) {
|
||||
Get-ChildItem "$env:SystemDrive\Users" -Directory | ForEach-Object {
|
||||
$path = Join-Path $_.FullName "Desktop"
|
||||
if (Test-Path $path) { $path }
|
||||
Get-ChildItem "$env:SystemDrive\Users" -Directory -Exclude "Public","Default" | ForEach-Object {
|
||||
Get-ChildItem $_.FullName -Directory -Filter "Desktop" -Depth 2 -ErrorAction SilentlyContinue |
|
||||
Select-Object -ExpandProperty FullName
|
||||
}
|
||||
} else {
|
||||
[Environment]::GetFolderPath("CommonDesktopDirectory")
|
||||
}
|
||||
}
|
||||
|
||||
$certSubject = "CN=RDPSign"
|
||||
|
||||
# Check certificate exists in all three stores
|
||||
|
||||
Reference in New Issue
Block a user