chocolatey-packages/cricut-design-space/tools/chocolateyinstall.ps1

31 lines
1.0 KiB
PowerShell
Raw Normal View History

$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installDir = "C:\Program Files (x86)\Cricut Design Space\"
$packageArgs = @{
packageName = $env:ChocolateyPackageName
File = '\\ucs\software\CricutDesignSpace-Install-v8.60.67.exe'
Checksum = '78b04935a1be4cef0e9f690a75b53c86c5783d8491760a5dada709544cf25d0c'
ChecksumType = 'sha256'
UnzipLocation = $toolsDir
}
Install-ChocolateyZipPackage @packageArgs
$innerPackageArgs = @{
File = "$(Join-Path $toolsDir '$PLUGINSDIR/app-32.7z')"
Destination = $installDir
}
Get-ChocolateyUnzip @innerPackageArgs
$shortcutArgs = @{
ShortcutFilePath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cricut Design Space.lnk"
TargetPath = "$(Join-Path $installDir 'Cricut Design Space.exe')"
WorkingDirectory = $installDir
IconLocation = "$(Join-Path $installDir 'Cricut Design Space.exe')"
Description = "Cricut Design Space Application"
}
Install-ChocolateyShortcut @shortcutArgs