aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2023-08-02 16:58:17 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2023-08-02 16:58:17 +0300
commitf19f8c6510923c6f3da566c0019e7e90daac947d (patch)
treec08496972d4751726d27f5527103ed4036e6f874
parente14d714811df1cc5d48543940042fd7481a86970 (diff)
Add PS Install script
-rw-r--r--Install.ps114
1 files changed, 14 insertions, 0 deletions
diff --git a/Install.ps1 b/Install.ps1
new file mode 100644
index 0000000..edf89c2
--- /dev/null
+++ b/Install.ps1
@@ -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() \ No newline at end of file