Add a function for removing desktop icons

This commit is contained in:
Manuel Thalmann 2023-07-16 12:32:46 +02:00
parent 18b1ae071c
commit 32030e1455
4 changed files with 7 additions and 3 deletions
scripts/Windows/Scripts

View file

@ -24,6 +24,10 @@ class Context {
}
}
[void] RemoveDesktopIcon($pattern) {
Remove-Item "$env:PUBLIC/Desktop/$pattern";
}
[Microsoft.Win32.RegistryKey] EnsureConfigKey() {
if (-not (Test-Path $this.ConfigRoot)) {
$null = New-Item $this.ConfigRoot;