more vagrant stuff

This commit is contained in:
Dax T. Games 2023-03-15 08:45:01 -04:00
parent 324aaf74f2
commit e33713a93f
3 changed files with 23 additions and 1 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ launcher/src/version.rc2
.vs/* .vs/*
.vscode .vscode
.idea .idea
.vagrant/

View File

@ -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
View 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()