teamviewer.com link icon
or
Ask The Community

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
  oFSO.CreateFolder strFolder
End If

CurrenTeamViewerID = oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\ClientID")

Set oFile = oFSO.createtextfile(strFileName, forwriting)
oFile.write CurrenTeamViewerID
oFile.close

 

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")
End If

oFile.Close()
oFSO.DeleteFile(Filename)

Somehow this does not work, after the isntallation, when i start teamviewer, it gets another ID, how to prevent this?

Regards

Alex

Comments

  • Jeremy
    Jeremy Posts: 106 Staff

    Hi Alex,

    I'm afraid it's not possible to change or restore a TeamViewer ID using the registry. The ID itself is generated using an advanced algorithm that takes into account various unique hardware and software identifiers from the computer, one of which being the operating system itself. That means if you upgrade or reinstall the operating system, you might end up with a new TeamViewer ID. If that happens, it's not possible to revert back to the previous ID at all.

    The "ClientID" value in the registry is only there as a reference; it's not used to actually determine or change the ID.

    Regards,
    Jeremy
    TeamViewer Quality Assurance Engineer
  • Hi Jeremy,

    and is it soemhow not possible to workaround this? Like with exporting the settings (dont know if they have the ID inside) Seeting all the values manualy for the algorythm to create the same ID again? There must be a way :D

    Thanks for your time

    Alex

  • Jeremy
    Jeremy Posts: 106 Staff

    Hi Alex,

    I'm afraid there is literally no way to avoid that. Exporting the settings from the registry wouldn't help, as the ID is not based on any setting in the registry.

    There are quite a number of unique hardware and software identifiers that are used to generate the ID, and most of them can't be manually changed. We also do not provide a list of them for security reasons.

    Regards,
    Jeremy
    TeamViewer Quality Assurance Engineer
  • Hi Jeremy,

    sad to hear that, but hanks for your time, ill try to cook something up :D

    Have a nice day.

    Alex

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!