mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
more vagrant stuff
This commit is contained in:
parent
324aaf74f2
commit
e33713a93f
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,3 +31,4 @@ launcher/src/version.rc2
|
|||||||
.vs/*
|
.vs/*
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
|
.vagrant/
|
||||||
|
@ -29,7 +29,7 @@ $env:cmder_root = "C:/tools/cmder"
|
|||||||
write-host "Creating '${env:USERPROFILE}/Desktop/Cmder.lnk'..."
|
write-host "Creating '${env:USERPROFILE}/Desktop/Cmder.lnk'..."
|
||||||
start-process -NoNewWindow -filePath "$env:userprofile/bin/set-shortcut.ps1" -ArgumentList "-sourceexe `"$env:cmder_root\\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\\Desktop\\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
start-process -NoNewWindow -filePath "$env:userprofile/bin/set-shortcut.ps1" -ArgumentList "-sourceexe `"$env:cmder_root\\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\\Desktop\\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||||
|
|
||||||
$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 "$env:userprofile\\bin\\set-shortcut.ps1" -ArgumentList "-sourceexe `"${env:cmder_root}\\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\\Desktop\\Cmderdev.lnk`" -WorkingDirectory `"${env:cmder_root}`""
|
start-process -NoNewWindow -filePath "$env:userprofile\\bin\\set-shortcut.ps1" -ArgumentList "-sourceexe `"${env:cmder_root}\\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\\Desktop\\Cmderdev.lnk`" -WorkingDirectory `"${env:cmder_root}`""
|
||||||
|
|
||||||
|
21
vendor/bin/set-shortcut.ps1
vendored
Normal file
21
vendor/bin/set-shortcut.ps1
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter()]
|
||||||
|
[string]$SourceExe,
|
||||||
|
[string]$Arguments,
|
||||||
|
[string]$DestinationPath,
|
||||||
|
[string]$WorkingDirectory,
|
||||||
|
[String]$IconLocation
|
||||||
|
)
|
||||||
|
|
||||||
|
if ($IconLocation -eq '') {
|
||||||
|
$IconLocation = $SourceExe
|
||||||
|
}
|
||||||
|
|
||||||
|
$WshShell = New-Object -comObject WScript.Shell
|
||||||
|
$Shortcut = $WshShell.CreateShortcut($destinationPath)
|
||||||
|
$Shortcut.TargetPath = $SourceExe
|
||||||
|
$Shortcut.Arguments = $Arguments
|
||||||
|
$shortcut.WorkingDirectory = $WorkingDirectory
|
||||||
|
$shortcut.IconLocation = $IconLocation
|
||||||
|
$Shortcut.Save()
|
Loading…
Reference in New Issue
Block a user