2022-12-28 12:20:27 +03:00
|
|
|
Set-StrictMode -Version latest
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
|
2022-09-28 18:41:43 +03:00
|
|
|
powershell write-host -foregroundcolor Cyan "----- install windows64 installer -----"
|
|
|
|
|
|
|
|
$actual_dir=(Get-Location).Path
|
|
|
|
$project_root_path=(Resolve-Path -LiteralPath $PSScriptRoot\..\..).path
|
|
|
|
|
|
|
|
# install windows64 installer
|
|
|
|
$package_dir="$project_root_path\target\win-package"
|
2023-09-12 12:47:26 +03:00
|
|
|
Start-Process powershell "$package_dir\*installer.exe /S" -NoNewWindow -Wait -PassThru
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2022-09-28 18:41:43 +03:00
|
|
|
|
|
|
|
# refresh env
|
|
|
|
$registry_user_path=(Get-ItemProperty -Path 'HKCU:\Environment').Path
|
|
|
|
$registry_machine_path=(Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment').Path
|
|
|
|
$env:Path = "$registry_user_path;$registry_machine_path"
|
2022-11-10 21:15:52 +03:00
|
|
|
sleep 10
|
2022-09-28 18:41:43 +03:00
|
|
|
|
|
|
|
|
|
|
|
# hurl infos
|
|
|
|
(Get-Command hurl).Path
|
|
|
|
(Get-Command hurlfmt).Path
|
|
|
|
hurl --version
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2022-09-28 18:41:43 +03:00
|
|
|
hurlfmt --version
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2022-09-28 18:41:43 +03:00
|
|
|
|
|
|
|
cd $actual_dir
|
2023-04-05 12:07:50 +03:00
|
|
|
|