mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 05:43:53 +02:00
Updated the cd-*.ps1 scripts
This commit is contained in:
@ -13,12 +13,12 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
$Path = Resolve-Path "$HOME/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup"
|
||||
if (-not(Test-Path "$Path" -pathType container)) {
|
||||
throw "Autostart folder at 📂$Path doesn't exist (yet)"
|
||||
$path = Resolve-Path "~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup"
|
||||
if (-not(Test-Path "$path" -pathType container)) {
|
||||
throw "Autostart folder at 📂$path doesn't exist (yet)"
|
||||
}
|
||||
Set-Location "$Path"
|
||||
"📂$Path"
|
||||
Set-Location "$path"
|
||||
"📂$path"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user