Skip to content

Commit

Permalink
Trying to fix Installer doesn't always install WebView2 SlimeVR#41
Browse files Browse the repository at this point in the history
  • Loading branch information
unlogisch04 committed Jan 6, 2024
1 parent 5e38c4a commit d8c937a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions windows/web/slimevr_web_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -628,16 +628,20 @@ Function componentsPre
${EndIf}

# Detect WebView2
# https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#detect-if-a-suitable-webview2-runtime-is-already-installed
# Trying to solve #41 Installer doesn't always install WebView2
# Ignoring only user installed WebView2 it seems to make problems
${If} ${RunningX64}
ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
ReadRegStr $1 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
# ReadRegStr $1 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
${Else}
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
ReadRegStr $1 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
# ReadRegStr $1 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
${EndIf}

${If} $0 == ""
${AndIf} $1 == ""
${If} ${Errors}
${OrIf} $0 == ""
${OrIf} $0 == "0.0.0.0"
SectionSetFlags ${SEC_WEBVIEW} ${SF_SELECTED}|${SF_RO}
${Else}
SectionSetFlags ${SEC_WEBVIEW} ${SF_USELECTED}|${SF_RO}
Expand Down

0 comments on commit d8c937a

Please sign in to comment.