diff --git a/packages/common.vm/common.vm.nuspec b/packages/common.vm/common.vm.nuspec index 2995c8510..295caf221 100755 --- a/packages/common.vm/common.vm.nuspec +++ b/packages/common.vm/common.vm.nuspec @@ -2,7 +2,7 @@ common.vm - 0.0.0.20240321 + 0.0.0.20240402 Common libraries for VM-packages Mandiant diff --git a/packages/common.vm/tools/vm.common/vm.common.psm1 b/packages/common.vm/tools/vm.common/vm.common.psm1 index 10349bc9d..8f805cf4f 100755 --- a/packages/common.vm/tools/vm.common/vm.common.psm1 +++ b/packages/common.vm/tools/vm.common/vm.common.psm1 @@ -281,12 +281,12 @@ function VM-Install-Shortcut{ # Set the default icon to be the executable's icon if (-Not $iconLocation) {$iconLocation = $executablePath} - if ($consoleApp -or $powershell) { - if (-not $executableDir) { - $executableDir = Join-Path ${Env:UserProfile} "Desktop" - } - VM-Assert-Path $executableDir + if (-not $executableDir) { + $executableDir = Join-Path ${Env:UserProfile} "Desktop" + } + VM-Assert-Path $executableDir + if ($consoleApp -or $powershell) { if ($consoleApp) { $executableCmd = Join-Path ${Env:WinDir} "system32\cmd.exe" -Resolve # Change to executable dir, print command to execute, and execute command @@ -307,19 +307,19 @@ function VM-Install-Shortcut{ if ($runAsAdmin) { $shortcutArgs.RunAsAdmin = $true } - Install-ChocolateyShortcut @shortcutArgs } else { $shortcutArgs = @{ ShortcutFilePath = $shortcut TargetPath = $executablePath + Arguments = $arguments + WorkingDirectory = $executableDir IconLocation = $iconLocation } if ($runAsAdmin) { $shortcutArgs.RunAsAdmin = $true } - Install-ChocolateyShortcut @shortcutArgs } VM-Assert-Path $shortcut @@ -707,7 +707,9 @@ function VM-Add-To-Right-Click-Menu { [ValidateSet("file", "directory")] [string] $type="file", [Parameter(Mandatory=$false)] - [string] $extension + [string] $extension, + [Parameter(Mandatory=$false)] + [switch] $background ) try { if ($extension) { @@ -717,7 +719,10 @@ function VM-Add-To-Right-Click-Menu { if ($type -eq "file") { $key = "*" } else { - $key = "directory" + $key = "Directory" + if ($background) { + $key += "\Background" + } } } $key_path = "HKCR:\$key\shell\$menuKey" @@ -755,7 +760,9 @@ function VM-Remove-From-Right-Click-Menu { [ValidateSet("file", "directory")] [string] $type="file", [Parameter(Mandatory=$false)] - [string] $extension + [string] $extension, + [Parameter(Mandatory=$false)] + [switch] $background ) try { if ($extension) { @@ -765,7 +772,10 @@ function VM-Remove-From-Right-Click-Menu { if ($type -eq "file") { $key = "*" } else { - $key = "directory" + $key = "Directory" + if ($background) { + $key += "\Background" + } } } $key_path = "HKCR:\$key\shell\$menuKey" diff --git a/packages/debloat.vm/debloat.vm.nuspec b/packages/debloat.vm/debloat.vm.nuspec index 62e98b1db..073737604 100644 --- a/packages/debloat.vm/debloat.vm.nuspec +++ b/packages/debloat.vm/debloat.vm.nuspec @@ -2,7 +2,7 @@ debloat.vm - 0.0.0.20240321 + 0.0.0.20240327 Debloat and performance configurations for Windows OS Mandiant diff --git a/packages/debloat.vm/tools/win10.xml b/packages/debloat.vm/tools/win10.xml index 46697fb0e..dbf14e654 100644 --- a/packages/debloat.vm/tools/win10.xml +++ b/packages/debloat.vm/tools/win10.xml @@ -140,8 +140,6 @@ - -