Skip to content

Commit c11c0be

Browse files
committed
[microsoft-office.vm] Improve shortcut creation
Use the `VM-Install-Shortcut` helper function to create the Visual Studio shortcut simplifying the code and hopefully fixing the issues identified in: mandiant/flare-vm#660 (comment)
1 parent 47d6132 commit c11c0be

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/microsoft-office.vm/microsoft-office.vm.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
33
<metadata>
44
<id>microsoft-office.vm</id>
5-
<version>0.0.0.20250218</version>
5+
<version>0.0.0.20250423</version>
66
<description>Microsoft Office ProPlus2024Retail.</description>
77
<authors>Microsoft</authors>
88
<dependencies>

packages/microsoft-office.vm/tools/chocolateyinstall.ps1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ try {
99
@{name = 'OneNote'; executable = 'ONENOTE.EXE'}
1010
)
1111
$category = VM-Get-Category($MyInvocation.MyCommand.Definition)
12-
$shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category
1312

1413
# Install with choco instead as dependency to provide params such the product
1514
choco install microsoft-office-deployment --params="'/DisableUpdate:TRUE /Product:ProPlus2024Retail'" --no-progress
@@ -20,9 +19,7 @@ try {
2019
# Ensure the tools are installed and create shortcuts
2120
forEach ($tool in $tools) {
2221
$executablePath = Join-Path $officeDirectory $($tool.executable) -Resolve
23-
$shortcut = Join-Path $shortcutDir "$($tool.name).lnk"
24-
Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath
25-
VM-Assert-Path $shortcut
22+
VM-Install-Shortcut -toolName $tool.name -category $category -executablePath $executablePath
2623
}
2724
} catch {
2825
VM-Write-Log-Exception $_

0 commit comments

Comments
 (0)