Results 1 to 40 of 555

Thread: VB6 WebView2-Binding (Edge-Chromium)

Threaded View

  1. #10
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 WebView2-Binding (Edge-Chromium)

    i have a full test:WebView2Demo.vbp,
    i install MicrosoftEdgeWebview2Setup.exe for only user1,not for all user.
    change to windows user2(local user):

    RC6_ 2022-0731
    ---------------------------
    Runtime error '430':
    Class does not support automation or expected interfaces
    ---------------------------
    RC6_ 2023-0529
    ---------------------------
    Err: 53, Error in FindFirstFile: ErrNum: 3, the system cannot find the specified path.
    Couldn't initialize WebView Binding

    this will check HKEY_CURRENT_USER ,HKEY_LOCAL_MACHINE,WOW6432Node,x64

    Code:
    Function GetEdgeWebViewPath() As String
       On Error Resume Next
       Dim WshShell As Object, WebView2_Version As String
       Dim RegPath As String, location As String
       Set WshShell = CreateObject("Wscript.Shell") 'HKEY_CURRENT_USER , HKEY_LOCAL_MACHINE
       RegPath = "HKEY_CURRENT_USER\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}\"
       location = WshShell.RegRead(RegPath & "location")
       If location = "" Then
            RegPath = Replace(RegPath, "\WOW6432Node", "")
            location = WshShell.RegRead(RegPath & "location")
            If location = "" Then
                 RegPath = "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}\"
                 location = WshShell.RegRead(RegPath & "location")
                 If location = "" Then
                      RegPath = Replace(RegPath, "\WOW6432Node", "")
                      location = WshShell.RegRead(RegPath & "location")
                 End If
            End If
       End If
       If location <> "" Then GetEdgeWebViewPath = location & "\" & WshShell.RegRead(RegPath & "PV")
    End Function
    Last edited by xiaoyao; Jun 7th, 2023 at 03:22 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width