Update open-file-explorer.ps1

This commit is contained in:
Markus Fleschutz 2021-10-23 15:53:16 +02:00
parent 1f8804fe37
commit 9492c2cbda

View File

@ -16,7 +16,11 @@
param([string]$Path = "")
try {
start-process explorer.exe "$Path"
if ("$Path" -ne "") {
start-process explorer.exe "$Path"
} else {
start-process explorer.exe
}
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"