mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
cleanup
This commit is contained in:
parent
eb2444d04a
commit
bc0db6a7b6
36
vendor/bin/add-cmdertodesktop.ps1
vendored
36
vendor/bin/add-cmdertodesktop.ps1
vendored
@ -1,16 +1,30 @@
|
|||||||
if (test-path "${env:USERPROFILE}\cmder") {
|
|
||||||
$env:cmder_root = "${env:USERPROFILE}\cmder"
|
|
||||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
|
||||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"$env:cmder_root\vendor\bin\set-shortcut.ps1`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
|
||||||
} elseif (test-path "C:\tools\cmder") {
|
|
||||||
$env:cmder_root = "C:\tools\cmder"
|
|
||||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
|
||||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"$env:cmder_root\vendor\bin\set-shortcut.ps1`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
|
||||||
}
|
|
||||||
|
|
||||||
if (test-path "${env:USERPROFILE}\cmderdev") {
|
if (test-path "${env:USERPROFILE}\cmderdev") {
|
||||||
$env:cmder_root = "${env:USERPROFILE}\cmderdev"
|
$env:cmder_root = "${env:USERPROFILE}\cmderdev"
|
||||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmderdev.lnk'..."
|
write-host "Creating '${env:USERPROFILE}\Desktop\Cmderdev.lnk'..."
|
||||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"$env:cmder_root\vendor\bin\set-shortcut.ps1`" -sourceexe `"${env:cmder_root}\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmderdev.lnk`" -WorkingDirectory `"${env:cmder_root}`""
|
|
||||||
|
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||||
|
|
||||||
|
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"${env:cmder_root}\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmderdev.lnk`" -WorkingDirectory `"${env:cmder_root}`""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test-path "${env:USERPROFILE}\cmder") {
|
||||||
|
$env:cmder_root = "${env:USERPROFILE}\cmder"
|
||||||
|
|
||||||
|
if (test-path "${cmder_root}\vendor\bin\set-shortcut.ps1") {
|
||||||
|
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||||
|
}
|
||||||
|
|
||||||
|
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
||||||
|
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||||
|
} elseif (test-path "C:\tools\cmder") {
|
||||||
|
$env:cmder_root = "C:\tools\cmder"
|
||||||
|
|
||||||
|
if (test-path "${cmder_root}\vendor\bin\set-shortcut.ps1") {
|
||||||
|
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||||
|
}
|
||||||
|
|
||||||
|
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
||||||
|
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user