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




Reply With Quote