Teamviewer 64bit anpassung bzw. Program auf 64 bit umgestellt, damit Reg Einträge wieder richtig ausgelesen werden können

This commit is contained in:
ms
2025-03-25 09:59:34 +01:00
parent 0e5472a0f8
commit 37ac47bc65
2 changed files with 18 additions and 8 deletions

24
Main.vb
View File

@@ -1,6 +1,7 @@
Imports System.Environment Imports System.Environment
Imports System.Globalization Imports System.Globalization
Imports System.IO Imports System.IO
Imports Microsoft.Win32
Public Class TSUserReporter Public Class TSUserReporter
@@ -83,14 +84,23 @@ Public Class TSUserReporter
End Function End Function
Function getregkey() Function getregkey()
Dim Reg As String = Nothing Dim regObj As Object = Nothing
If My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\TeamViewer", "ClientIDOfTSUser", Nothing) Is Nothing Then
Reg = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\TeamViewer", "ClientID", Nothing) ' 1. HKCU
Else regObj = Registry.GetValue("HKEY_CURRENT_USER\Software\TeamViewer", "ClientIDOfTSUser", Nothing)
Reg = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\TeamViewer", "ClientIDOfTSUser", Nothing) If regObj IsNot Nothing Then Return regObj.ToString()
End If
' 2. HKLM\WOW6432Node
regObj = Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\TeamViewer", "ClientID", Nothing)
If regObj IsNot Nothing Then Return regObj.ToString()
' 3. HKLM (Standard-Pfad, 64-bit)
regObj = Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer", "ClientID", Nothing)
If regObj IsNot Nothing Then Return regObj.ToString()
' Falls nichts gefunden
Return Nothing
Return Reg
End Function End Function
Function Report() Function Report()

View File

@@ -32,7 +32,7 @@
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>