Add PS Install script
This commit is contained in:
parent
e14d714811
commit
f19f8c6510
14
Install.ps1
Normal file
14
Install.ps1
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
$object = Invoke-WebRequest -Uri "https://gitea.cebotari.ru/api/v1/repos/chebser/RhSolutions-AddIn/releases/latest" | ConvertFrom-Json
|
||||||
|
$download_link = $object.assets[1].browser_download_url
|
||||||
|
Invoke-WebRequest -Uri $download_link -OutFile "$env:appdata\Microsoft\AddIns\RhSolutions-AddIn-packed.xll"
|
||||||
|
|
||||||
|
$excel = New-Object -ComObject Excel.Application
|
||||||
|
foreach ($addin in $excel.AddIns2)
|
||||||
|
{
|
||||||
|
$title = $addin.Title
|
||||||
|
if ($title -eq 'RhSolutions Add-In')
|
||||||
|
{
|
||||||
|
$addin.Installed = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$excel.Quit()
|
Loading…
Reference in New Issue
Block a user