Skip to content

Commit

Permalink
Try unregister vs2017 dlls
Browse files Browse the repository at this point in the history
Test registration with install switches.

Restore defaults

Try VS install switches fix

Skip vs2017 role

Test for DLL exists before register test.

Test logged install

Switch to full install.

Test vs2017 install via powershell

Test alt install cmd
  • Loading branch information
steelhead31 committed Sep 5, 2023
1 parent 1995775 commit f5794f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ansible/1.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://download.visualstudio.microsoft.com/download/pr/c5c75dfa-1b29-4419-80f8-bd39aed6bcd9/7ed8fa27575648163e07548ff5667b55b95663a2323e2b2a5f87b16284e481e6/vs_Community.exe
C:\temp\vs_community.exe --wait --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended;includeOptional --quiet --norestart
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,32 @@
tags: MSVS_2017

- name: Install Visual Studio Community 2017
win_shell: 'C:\temp\vs_community.exe --wait --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended;includeOptional --quiet --norestart'
win_shell: 'C:\temp\vs_community.exe --wait --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --includeOptional --passive --norestart'
args:
executable: cmd
when: (not vs2017_installed.stat.exists)
register: vs2017_error
failed_when: vs2017_error.rc != 1 and vs2017_error.rc != 0
tags: MSVS_2017

- name: Test if VS 2017 DLL 1 is installed
win_stat:
path: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\bin\msdia140.dll'
register: vs2017_dll_1_installed
tags: MSVS_2017

- name: Test if VS 2017 DLL 2 is installed
win_stat:
path: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\bin\amd64\msdia140.dll'
register: vs2017_dll_2_installed
tags: MSVS_2017

- name: Register Visual Studio Community 2017 DIA SDK shared libraries
win_command: 'regsvr32 /s "{{ item }}"'
with_items:
- C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\bin\msdia140.dll
- C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK\bin\amd64\msdia140.dll
when: (vs2017_dll_1_installed.stat.exists) and (vs2017_dll_2_installed.stat.exists)
tags: MSVS_2017

- name: Reboot machine after Visual Studio installation
Expand Down

0 comments on commit f5794f2

Please sign in to comment.