Logicool Optionsツールのインストールが失敗する
はじめに
Logicool製品を使用する場合は、PC側に下記のLOGI OPTIONS+というユーティリティツールをインストールしておくと、細かい設定が出来たりして便利なのは周知の事実。
ただ、このインストーラ、実行途中でロジクールのダウンロードサーバ?に接続し、インストールに必要な追加データをダウンロードしているが、ネットワークに接続されているのに、なぜか下記のようなエラーが出てインストールできないことがある。
回避手順がないか調べたので記載します。

回避手順
オフラインインストーラでインストールすると上手くいきました。
ロジクールの下記サイトにアクセスする。 https://prosupport.logi.com/hc/ja/articles/10991109278871-Logitech-Options-Offline-Installer
Windowsの場合、サイト内の下記をクリックしてオフラインインストーラ(logioptionsplus_installer_offline.exe)をダウンロードする。

ダウンロードしたファイル(logioptionsplus_installer_offline.exe)を実行して、手順に従ってインストールする。
gitLab ymlの環境変数
# リピジトリ名 - echo $env:CI_PROJECT_NAME # pipelineのURL取得 - echo $env:CI_PIPELINE_URL # 取得 - $desc = '"' + "CI_Error" + "\r\n" + $env:CI_PIPELINE_URL +'"'
- before_scriptが失敗するとscriptは動かない
- afrer_scriptは常に動くので、後処理を書く
GitLab CI/CD ymdサンプル
前提条件
- Azureにログインしていること
- gitlabrunnerがインストールされていること
- sshツールは下記のものを使用すること
github.com
tages: - build - test - test_failed - test_succeed build_job_test_win: stage: build script: # Azure ON - az vm start --name myVmMachine --resource-group myResourceGroup #sshサーバデーモン起動まで一定時間待ち合わせる - sleep xx # vm情報からIPアドレスを抽出する $IPAAA =az vm show -d --resource-group $myResourceGroup --name $myVmMachine --query publicIps -o tsv echo $IPAAA # Host Key Verification確認を無視してSSH接続してコマンドを実行する ssh -o "StrictHostKeyChecking=no" userName@接続先IP # Azure OFF(停止&割り当て解除) - az vm stop --name myVmMachine --resource-group myResourceGroup - az vm deallocate --name myVmMachine --resource-group myResourceGroup # run tests using the binary built before test: stage: test script: # テストツール取得 - cp autoTestExample.exe . # Qtテスト実行 - ./autoTestExample.exe -o report.xml,xunitxml artifacts: when: always reports: junit: report.xml test_succeed: stage: test_succeed script: - echo "OK" when: on_success test_failed: stage: test_failed script: - echo "NG" # redmine_issue.ps1スクリプトを取得 - cp redmine_issue.ps1 . # 実行 - PowerShell -ExecutionPolicy RemoteSigned ./redmine_issue.ps1 XXX when: on_failure
Redmineのチケット発行
- powershell上の実行内容
powershell -ExecutionPolicy RemoteSigned-command .\redmine_issue.ps1 ` -accessKey xxxx ` -redmineUrl http://xxxxx.com ` -projectID XX ` -trackerID XX ` -title "XXX" ` -desc "XXX" ` -userId X ` -watcherIdArray X,Y,Z
- redmine_issue.ps1
#引数定義 Param( [String]$accessKey, [String]$redmineUrl, [String]$projectID, [String]$trackerID, [String]$title, [String]$desc, [String]$userId, [array]$watcherIdArray, ) #チケット発行URL $postUri = $redmineUrl + "/issues.json" # JSONパラメータ内容編集 $issue = @{ project_id = $projectID; # プロジェクトID tracker_id = $trackerID; # トラッカーID(カテゴリ) subject = $title; # タイトル description = $desc.Replace("\r\n","`n") # 説明 assigned_to_id = $userId; # 担当者 ユーザID or グループID watcher_user_ids = $watcherIdArray; } $issueJson = @{issue = $issue; key = $accessKey} # 書き換えたパラメータをjson形式に戻す $postText = ConvertTo-Json $issueJson #body部(json)変換 $postBody = [Text.Encoding]::UTF8.GetBytes($postText) #REST API実行 $Redmine = Invoke-RestMethod -Method POST -Uri $postUri -Body $postBody -ContentType application/json