ExtractArchive(EPath & "Update.zip", InstallTo)
Dim MyShortcut As IWshRuntimeLibrary.IWshShortcut
Dim DesktopFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
MyShortcut = CType(WshShell.CreateShortcut(DesktopFolder & "\KT Browser.lnk"), IWshRuntimeLibrary.IWshShortcut)
MyShortcut.Description = "Trình duyệt Web KT Browser."
MyShortcut.WorkingDirectory = InstallTo
MyShortcut.TargetPath = InstallTo & "\KT Browser.exe"
MyShortcut.Save()
If CheckBox1.Checked = True Then
MaterialLabel1.Text = "xíu nữa - đang đăng kí với ngen..."
Dim f4 As String = Path.GetFullPath(Environment.SystemDirectory + "\..\Microsoft.NET\Framework\v4.0.30319\ngen.exe")
Shell(f4 & " install " & """" & InstallTo & "\KT Browser.exe" & """", AppWinStyle.Hide, True)
End If
MaterialLabel1.Text = "đang tạo khóa..."
My.Computer.Registry.LocalMachine.CreateSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser", "DisplayName", "KT Browser")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser", "DisplayIcon", InstallTo & "\KT Browser.exe,0")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser", "HelpLink", "mailto:[email protected]")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser", "Publisher", "KTTECH - Nguyễn Anh Khoa")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser", "UninstallString", InstallTo & "\Uninstall.exe")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KT Browser", "URLInfoAbout", "kt-browser.com")
If Microsoft.Win32.Registry.LocalMachine.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", "KT Browser.exe", Nothing) Is Nothing Then
Dim Version = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory & "\ieframe.dll")
If Version.FileMajorPart = 8 Then
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", True)
regKey.SetValue("KT Browser.exe", "8000", RegistryValueKind.DWord)
regKey.Close()
ElseIf Version.FileMajorPart = 9 Then
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", True)
regKey.SetValue("KT Browser.exe", "9000", RegistryValueKind.DWord)
regKey.Close()
ElseIf Version.FileMajorPart = 10 Then
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", True)
regKey.SetValue("KT Browser.exe", "10000", RegistryValueKind.DWord)
regKey.Close()
ElseIf Version.FileMajorPart = 11 Then
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", True)
regKey.SetValue("KT Browser.exe", "11000", RegistryValueKind.DWord)
regKey.Close()
Else
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", True)
regKey.SetValue("KT Browser.exe", "9000", RegistryValueKind.DWord)
regKey.Close()
End If
End If