Skip to content

Commit 117dc50

Browse files
authored
Merge pull request #108 from ioa747/v2.1.0-alpha
V2.1.0 alpha
2 parents 72ff955 + 35b9fce commit 117dc50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2809
-5726
lines changed

NetWebView2Lib.au3

Lines changed: 208 additions & 35 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 291 additions & 241 deletions
Large diffs are not rendered by default.

bin/NetWebView2Lib.dll

-97.5 KB
Binary file not shown.

bin/NetWebView2Lib.tlb

-31.8 KB
Binary file not shown.

bin/RegCleaner.au3

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <WindowsConstants.au3>
1111
#include "..\NetWebView2Lib.au3"
1212

13+
; RegCleaner.au3
14+
1315
Global $_g_s_ELEMENTs = ''
1416

1517
_Cleaner()
@@ -18,7 +20,7 @@ Func _Cleaner()
1820
ConsoleWrite("! MicrosoftEdgeWebview2 : version check: " & _NetWebView2_IsAlreadyInstalled() & ' ERR=' & @error & ' EXT=' & @extended & @CRLF)
1921

2022
; === Configuration ===
21-
Local $sSearchTerm = "NetWebView2"
23+
Local $sSearchTerm = "NetWebView2Lib" ; NetWebView2Lib
2224
Local $aTargets[2] = ["HKEY_LOCAL_MACHINE64\SOFTWARE\Classes", "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Classes"]
2325

2426
; GUICreate

bin/Register_web2.au3

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
#include <Misc.au3>
99
#include "..\NetWebView2Lib.au3"
1010

11+
; Register_web2.au3
12+
1113
_Register()
1214

1315
Func _Register()
1416
ConsoleWrite("! MicrosoftEdgeWebview2 : version check: " & _NetWebView2_IsAlreadyInstalled() & ' ERR=' & @error & ' EXT=' & @extended & @CRLF)
1517

1618
; === Configuration ===
19+
1720
Local $sDllName = "NetWebView2Lib.dll"
1821
Local $sNet4_x86 = "C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
1922
Local $sNet4_x64 = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe"
@@ -56,13 +59,14 @@ Func _Register()
5659
EndIf
5760
EndIf
5861

62+
; === Registration 'NetWebView2Lib.dll' COM ===
5963
If Not $bAbort Then
60-
; === Registration 'NetWebView2Lib.dll' COM ===
64+
6165
Local $iExitCode
6266

6367
; Registration for x86 (32-bit)
6468
If FileExists($sNet4_x86) Then
65-
$iExitCode = RunWait('"' & $sNet4_x86 & '" "' & @ScriptDir & '\' & $sDllName & '" /codebase /tlb', @ScriptDir, @SW_HIDE)
69+
$iExitCode = RunWait('"' & $sNet4_x86 & '" "' & @ScriptDir & '\x86\' & $sDllName & '" /codebase /tlb', @ScriptDir, @SW_HIDE)
6670
If $iExitCode = 0 Then
6771
$sLog &= "[+] x86 Registration: SUCCESS" & @CRLF
6872
$bSuccess = True
@@ -75,12 +79,9 @@ Func _Register()
7579

7680
; Registration for x64 (64-bit)
7781
If FileExists($sNet4_x64) Then
78-
$iExitCode = RunWait('"' & $sNet4_x64 & '" "' & @ScriptDir & '\' & $sDllName & '" /codebase /tlb', @ScriptDir, @SW_HIDE)
82+
$iExitCode = RunWait('"' & $sNet4_x64 & '" "' & @ScriptDir & '\x64\' & $sDllName & '" /codebase /tlb', @ScriptDir, @SW_HIDE)
7983
If $iExitCode = 0 Then
8084
$sLog &= "[+] x64 Registration: SUCCESS" & @CRLF
81-
$sLog &= @CRLF
82-
$sLog &= "Validation:" & @CRLF
83-
$sLog &= " _NetWebView2_IsRegisteredCOMObject() =" & _NetWebView2_IsRegisteredCOMObject() & @CRLF
8485
$bSuccess = True
8586
Else
8687
$sLog &= "[-] x64 Registration: FAILED (Code: " & $iExitCode & ")" & @CRLF
@@ -93,6 +94,10 @@ Func _Register()
9394
; === Final Message ===
9495
If $bSuccess Then
9596
ConsoleWrite("+ Registration Complete" & @CRLF)
97+
$sLog &= @CRLF
98+
$sLog &= "Validation:" & @CRLF
99+
$sLog &= " _NetWebView2_IsRegisteredCOMObject() =" & _NetWebView2_IsRegisteredCOMObject() & @CRLF
100+
96101
ConsoleWrite($sLog & @CRLF)
97102

98103
MsgBox($MB_ICONINFORMATION, "Registration Complete", $sLog)

bin/Unregister.au3

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include <MsgBoxConstants.au3>
88
#include "..\NetWebView2Lib.au3"
99

10+
; Unregister.au3
11+
1012
_Unregister()
1113

1214
Func _Unregister()
@@ -25,13 +27,13 @@ Func _Unregister()
2527

2628
; === Unregister x86 ===
2729
If FileExists($sNet4_x86) Then
28-
$iExitCode = RunWait('"' & $sNet4_x86 & '" /u "' & @ScriptDir & '\' & $sDllName & '"', @ScriptDir, @SW_HIDE)
30+
$iExitCode = RunWait('"' & $sNet4_x86 & '" /u "' & @ScriptDir & '\x86\' & $sDllName & '"', @ScriptDir, @SW_HIDE)
2931
$sLog &= ($iExitCode = 0 ? "[+] x86 Unregistration: SUCCESS" : "[-] x86 Unregistration: FAILED") & @CRLF
3032
EndIf
3133

3234
; === Unregister x64 ===
3335
If FileExists($sNet4_x64) Then
34-
$iExitCode = RunWait('"' & $sNet4_x64 & '" /u "' & @ScriptDir & '\' & $sDllName & '"', @ScriptDir, @SW_HIDE)
36+
$iExitCode = RunWait('"' & $sNet4_x64 & '" /u "' & @ScriptDir & '\x64\' & $sDllName & '"', @ScriptDir, @SW_HIDE)
3537
$sLog &= ($iExitCode = 0 ? "[+] x64 Unregistration: SUCCESS" : "[-] x64 Unregistration: FAILED") & @CRLF
3638
EndIf
3739

File renamed without changes.

0 commit comments

Comments
 (0)