-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #876 from mandiant/package-microsoft-windows-terminal
🤖 Add microsoft-windows-terminal.vm
- Loading branch information
Showing
5 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/microsoft-windows-terminal.vm/microsoft-windows-terminal.vm.nuspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>microsoft-windows-terminal.vm</id> | ||
<version>1.18.3181</version> | ||
<authors>Microsoft</authors> | ||
<description>Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users.</description> | ||
<dependencies> | ||
<dependency id="common.vm" /> | ||
<dependency id="microsoft-windows-terminal" version="[1.18.3181]" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
15 changes: 15 additions & 0 deletions
15
packages/microsoft-windows-terminal.vm/tools/chocolateyinstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
$toolName = 'Microsoft Windows Terminal' | ||
$executablePath = '%LocalAppData%\Microsoft\WindowsApps\wt.exe' | ||
|
||
$shortcutDir = ${Env:RAW_TOOLS_DIR} | ||
$shortcut = Join-Path $shortcutDir "$toolName.lnk" | ||
# Create an admin shortcut that we can pin to the taskbar (analogous to the Admin Command Prompt for cmd.exe). | ||
Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath -RunAsAdmin | ||
VM-Assert-Path $shortcut | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/microsoft-windows-terminal.vm/tools/chocolateyuninstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
$toolName = 'Microsoft Windows Terminal' | ||
$shortcutDir = ${Env:RAW_TOOLS_DIR} | ||
$shortcut = Join-Path $shortcutDir "$toolName.lnk" | ||
|
||
Remove-Item $shortcut -Force -ea 0 | Out-Null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters