A Comunidade TeamViewer chega ao Brasil 🎉
Check out our brand-new Portuguese Community 👉 here 👈.
Keep old Teamviewer ID after an PC reinstall
Hello Guys and Girls,
sooo, the question is how to make it happen, the state im in is as follows: I created an script that will first save the client ID from the registry
Dim CurrenTeamViewerID, oFile, oShell, oFSO
Const forwriting = 2
Const strFolder = "E:\Deployment\"
Const strFileName = "E:\Deployment\teamviewerID.txt"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("Wscript.shell")
If Not oFSO.FolderExists(strFolder) Then
CurrenTeamViewerID = oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\ClientID")
Set oFile = oFSO.createtextfile(strFileName, forwriting)
After the installation finishes (the E drive is not formated so the file persists) there is another script which restores the ID into the registry:
Dim oFSO, oShell, oFile, strTeamViewerID
Const forreading = 1
Const Filename = "E:\deployment\teamviewerID.txt"
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("wscript.shell")
If oFSO.FileExists(Filename) Then
set oFile = oFSO.opentextfile(Filename, forreading)
strTeamViewerID = oFile.readline
strTeamViewerID = left(strTeamViewerID, 9)
oShell.regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\ClientID", strTeamViewerID, "REG_DWORD")
Somehow this does not work, after the isntallation, when i start teamviewer, it gets another ID, how to prevent this?