Compare commits

...

2 commits

Author SHA1 Message Date
Manuel Thalmann 76a9004e3c Determine software script name properly 2024-08-06 12:21:48 +02:00
Manuel Thalmann 92d041c327 Fix incorrect path 2024-08-06 12:21:00 +02:00
2 changed files with 5 additions and 5 deletions

View file

@ -16,11 +16,11 @@ $null = New-Module {
[hashtable] $Arguments
)
Start-Operation {
if (-not $Name) {
$Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName));
}
Start-Operation {
if ($null -ne $Name) {
$Name = "``$Name``";
} else {

View file

@ -21,7 +21,7 @@ function Remove-DesktopIcon {
$path = "Desktop/$Pattern";
foreach ($userDir in @($(~), $env:PUBLIC, "$env:SystemDrive/Users/Default")) {
foreach ($userDir in @("~", $env:PUBLIC, "$env:SystemDrive/Users/Default")) {
$fullName = "$userDir/$path";
if (Test-Path -PathType Leaf $fullName) {