As shown at http://technicians-blog.kingcomputer.com.au
So you have sign up to teamviwer and now you need to roll out the client to all desktop within your network.
Well there are a few steps.
Install Teamviewer
Configure
backup Config
Rollout to Clients
Use Script to get Client IDs
See Detail Steps below
1. Install TeamViewer on one of your machines and configure all options the way you want TeamViewer to run on all machines. Including Password if requied
2. Open the options dialog (Extras Options) of the configured TeamViewer and switch to the tab Advanced.
Click the button Export at the bottom of this tab to export all options to a .reg file. You can enter your license key during export if you want to deploy your licenses key, too.
3. Copy all the files of this package and the exported .reg file to a network share. This share has to be accessible by all machines TeamViewer is to be deployed to.
4. Open the file Install_MSI.vbs using a text editor
Set the value of MSIPATH to the path of the network share (UNC notation required).
Set the value of Install_regfilename32 to the name of your exported .reg file.
If you want to deploy TeamViewer to machines running Windows x64 Editions please create a copy of the exported .reg file and modify the registry paths to fit x64. Set the value of Install_regfilename64 to the name of this x64 .reg file.
You can modify the filename of the MSI package file if you rather want to install the full version of TeamViewer or TeamViewer Host.
Save and close Install_MS.vbs.
5. Log on to your domain controller and open the group policy editor.
Create a new group policy and set the file Install_MSI.vbs as startup script.
Rebooting the target machines will execute the installation of TeamViewer using the MSI package.
See Example Script at End.
Now that you have Teamviewer rolled out to your clients you will need IDs.
What I did was use the Teamviewer batch file and add it to the AD group policy that rolls out the Clients.
Script
Save to ListID.bat and ensure computers have access to Disk location
*****
@echo off
FOR /F skip=2 tokens=2* %%i IN (reg query HKLM\System\ControlSet001\Control\Computername\Computername /V Computername) do set Name=%%j
FOR /F skip=2 tokens=2* %%i IN (reg query HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version6 /V ClientID) do set /a LAD=%%j
echo %LAD% > \\server\Disks\Teamviewer\Msi\%name%.txt
****
VBS Script to install Teamviewer
Notice Path to MSIPATH remember \ at end
Const TvModuleName to file name.
Const Regfilename32 name of registry file saved.
********
Option Explicit
Const TeamViewerVersion = 6.0.10344
Dim Shell, FSO, msiPath
Set FSO = CreateObject(Scripting.FileSystemObject)
Set Shell = WScript.CreateObject(WScript.Shell)
DO NOT EDIT ABOVE THIS LINE
msiPath = FSO.GetParentFolderName (WScript.ScriptFullName) & \ Pfad aus Script-Namen extrahieren Get path from script name!
msiPath = \\server\Disks\Teamviewer\Msi\ Pfad zur Netzfreigabe mit MSI-Packet - Path to network share containing the MSI files
Const TvModuleName = teamviewer.msi
Const TvModuleName = teamviewer_host.msi
Const Regfilename32 = Teamviewer6.reg Reg-Datei von TeamViewer für 32-bit Systeme - Reg file for TeamViewer on 32-bit systems
Const Regfilename64 = tv-regfile64.reg Reg-Datei von TeamViewer für 64-bit Systeme - Reg file for TeamViewer on 64-bit systems
Const FORCEINSTALLATION = false TeamViewer immer Installieren/Aktuallisieren - install or update TeamViewer allways�
DO NOT EDIT BELOW THIS LINE
Dim Install_regfilename32, Install_regfilename64, Install_regfilename, VersionCompare, UninstallRegDir
Install_regfilename32 = chr(34) & msipath & Regfilename32 & chr(34) Reg-Datei von TeamViewer für 32-bit Systeme - Reg file for TeamViewer on 32-bit systems
Install_regfilename64 = chr(34) & msipath & Regfilename64 & chr(34) Reg-Datei von TeamViewer für 64-bit Systeme - Reg file for TeamViewer on 64-bit systems
CheckPlatform first of all check Plattform!!!
VersionCompare = CheckInstalledTeamViewerVersion check current installed version
If ((VersionCompare = 1) Or FORCEINSTALLATION) Then
WriteRegistry Install_regfilename import registry settings
End If
If (VersionCompare = 1) Then
InstallTeamViewer install newer or very first version
Else
If (VersionCompare = 0 And FORCEINSTALLATION) Then
RepareTeamViewer reinstall same version
End If
End If
Return Values
-1 eine ältere Version - Older version
0 Gleiche Version - Equal version
1 neuere Version oder nichts installiert. - Newer Version or not yet installed
Function CheckInstalledTeamViewerVersion()
Dim objReg, arrSubkeys, strValue, installedVersionNumber, strSubkey, intRet
CheckInstalledTeamViewerVersion = 1 Assume newer version
Const HKLM = &H80000002 HKEY_LOCAL_MACHINE
�
Set objReg = GetObject(winmgmts://./root/default:StdRegProv) �
objReg.EnumKey HKLM, UninstallRegDir, arrSubkeys
For Each strSubkey In arrSubkeys
intRet = objReg.GetStringValue(HKLM, UninstallRegDir & strSubkey, DisplayName, strValue) �
If (intRet = 0) Then
If strValue = TeamViewer 6 (MSI Wrapper) Or strValue = TeamViewer 6 Host (MSI Wrapper) Then
objReg.GetStringValue HKLM, UninstallRegDir & strSubkey, DisplayVersion, InstalledVersionNumber
MsgBox(InstalledVersionNumber)
If ( cint(Mid(TEAMVIEWERVERSION,5,Len(TEAMVIEWERVERSION)-4)) < cint(Mid(installedVersionNumber,5,Len(InstalledVersionNumber)-4)) ) Then
CheckInstalledTeamViewerVersion = -1 older version �
End If
If ( cint(Mid(TEAMVIEWERVERSION,5,Len(TEAMVIEWERVERSION)-4)) = cint(Mid(installedVersionNumber,5,Len(InstalledVersionNumber)-4)) ) Then
CheckInstalledTeamViewerVersion = 0 equal verion �
End If
End If
End If �
Next
End Function
Überprüfung der aktuellen Plattform
Function CheckPlatform()
Dim regCheck, platform
�
RegCheck = shell.regread(HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE)
x86
platform=InStr(RegCheck,86)
If platform >= 1 Then
Install_regfilename = Install_regfilename32
UninstallRegDir = SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
End If
�
x64
platform=InStr(RegCheck,64)
If platform >= 1 Then
Install_regfilename = Install_regfilename64
UninstallRegDir = SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
End If
End Function
Schreiben der TeamViewer Registry-Keys
Function WriteRegistry(regfilename)
Shell.Run regedit /s & regfilename, 0,True
End Function
Function InstallTeamViewer()
MsgBox(Install)
Shell.Run msiexec.exe /i & chr(34) & msiPath & TvModuleName & chr(34) & /quiet, 0,True
End Function
Function RepareTeamViewer()
MsgBox(Repair)
Shell.Run msiexec.exe /fa & chr(34) & msiPath & TvModuleName & chr(34) & /quiet, 0,True
Shell.Run msiexec.exe /i & chr(34) & msiPath & TvModuleName & chr(34) & /quiet REINSTALL=ALL REBOOT=ReallySuppress, 0,True
End Function
*****
You can also compare above to below in WinMerge
Well there are a few steps.
Install Teamviewer
Configure
backup Config
Rollout to Clients
Use Script to get Client IDs
See Detail Steps below
1. Install TeamViewer on one of your machines and configure all options the way you want TeamViewer to run on all machines. Including Password if requied
2. Open the options dialog (Extras Options) of the configured TeamViewer and switch to the tab Advanced.
Click the button Export at the bottom of this tab to export all options to a .reg file. You can enter your license key during export if you want to deploy your licenses key, too.
3. Copy all the files of this package and the exported .reg file to a network share. This share has to be accessible by all machines TeamViewer is to be deployed to.
4. Open the file Install_MSI.vbs using a text editor
Set the value of MSIPATH to the path of the network share (UNC notation required).
Set the value of Install_regfilename32 to the name of your exported .reg file.
If you want to deploy TeamViewer to machines running Windows x64 Editions please create a copy of the exported .reg file and modify the registry paths to fit x64. Set the value of Install_regfilename64 to the name of this x64 .reg file.
You can modify the filename of the MSI package file if you rather want to install the full version of TeamViewer or TeamViewer Host.
Save and close Install_MS.vbs.
5. Log on to your domain controller and open the group policy editor.
Create a new group policy and set the file Install_MSI.vbs as startup script.
Rebooting the target machines will execute the installation of TeamViewer using the MSI package.
See Example Script at End.
Now that you have Teamviewer rolled out to your clients you will need IDs.
What I did was use the Teamviewer batch file and add it to the AD group policy that rolls out the Clients.
Script
Save to ListID.bat and ensure computers have access to Disk location
*****
@echo off
FOR /F skip=2 tokens=2* %%i IN (reg query HKLM\System\ControlSet001\Control\Computername\Computername /V Computername) do set Name=%%j
FOR /F skip=2 tokens=2* %%i IN (reg query HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version6 /V ClientID) do set /a LAD=%%j
echo %LAD% > \\server\Disks\Teamviewer\Msi\%name%.txt
****
VBS Script to install Teamviewer
Notice Path to MSIPATH remember \ at end
Const TvModuleName to file name.
Const Regfilename32 name of registry file saved.
********
Option Explicit
Const TeamViewerVersion = 6.0.10344
Dim Shell, FSO, msiPath
Set FSO = CreateObject(Scripting.FileSystemObject)
Set Shell = WScript.CreateObject(WScript.Shell)
DO NOT EDIT ABOVE THIS LINE
msiPath = FSO.GetParentFolderName (WScript.ScriptFullName) & \ Pfad aus Script-Namen extrahieren Get path from script name!
msiPath = \\server\Disks\Teamviewer\Msi\ Pfad zur Netzfreigabe mit MSI-Packet - Path to network share containing the MSI files
Const TvModuleName = teamviewer.msi
Const TvModuleName = teamviewer_host.msi
Const Regfilename32 = Teamviewer6.reg Reg-Datei von TeamViewer für 32-bit Systeme - Reg file for TeamViewer on 32-bit systems
Const Regfilename64 = tv-regfile64.reg Reg-Datei von TeamViewer für 64-bit Systeme - Reg file for TeamViewer on 64-bit systems
Const FORCEINSTALLATION = false TeamViewer immer Installieren/Aktuallisieren - install or update TeamViewer allways�
DO NOT EDIT BELOW THIS LINE
Dim Install_regfilename32, Install_regfilename64, Install_regfilename, VersionCompare, UninstallRegDir
Install_regfilename32 = chr(34) & msipath & Regfilename32 & chr(34) Reg-Datei von TeamViewer für 32-bit Systeme - Reg file for TeamViewer on 32-bit systems
Install_regfilename64 = chr(34) & msipath & Regfilename64 & chr(34) Reg-Datei von TeamViewer für 64-bit Systeme - Reg file for TeamViewer on 64-bit systems
CheckPlatform first of all check Plattform!!!
VersionCompare = CheckInstalledTeamViewerVersion check current installed version
If ((VersionCompare = 1) Or FORCEINSTALLATION) Then
WriteRegistry Install_regfilename import registry settings
End If
If (VersionCompare = 1) Then
InstallTeamViewer install newer or very first version
Else
If (VersionCompare = 0 And FORCEINSTALLATION) Then
RepareTeamViewer reinstall same version
End If
End If
Return Values
-1 eine ältere Version - Older version
0 Gleiche Version - Equal version
1 neuere Version oder nichts installiert. - Newer Version or not yet installed
Function CheckInstalledTeamViewerVersion()
Dim objReg, arrSubkeys, strValue, installedVersionNumber, strSubkey, intRet
CheckInstalledTeamViewerVersion = 1 Assume newer version
Const HKLM = &H80000002 HKEY_LOCAL_MACHINE
�
Set objReg = GetObject(winmgmts://./root/default:StdRegProv) �
objReg.EnumKey HKLM, UninstallRegDir, arrSubkeys
For Each strSubkey In arrSubkeys
intRet = objReg.GetStringValue(HKLM, UninstallRegDir & strSubkey, DisplayName, strValue) �
If (intRet = 0) Then
If strValue = TeamViewer 6 (MSI Wrapper) Or strValue = TeamViewer 6 Host (MSI Wrapper) Then
objReg.GetStringValue HKLM, UninstallRegDir & strSubkey, DisplayVersion, InstalledVersionNumber
MsgBox(InstalledVersionNumber)
If ( cint(Mid(TEAMVIEWERVERSION,5,Len(TEAMVIEWERVERSION)-4)) < cint(Mid(installedVersionNumber,5,Len(InstalledVersionNumber)-4)) ) Then
CheckInstalledTeamViewerVersion = -1 older version �
End If
If ( cint(Mid(TEAMVIEWERVERSION,5,Len(TEAMVIEWERVERSION)-4)) = cint(Mid(installedVersionNumber,5,Len(InstalledVersionNumber)-4)) ) Then
CheckInstalledTeamViewerVersion = 0 equal verion �
End If
End If
End If �
Next
End Function
Überprüfung der aktuellen Plattform
Function CheckPlatform()
Dim regCheck, platform
�
RegCheck = shell.regread(HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE)
x86
platform=InStr(RegCheck,86)
If platform >= 1 Then
Install_regfilename = Install_regfilename32
UninstallRegDir = SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
End If
�
x64
platform=InStr(RegCheck,64)
If platform >= 1 Then
Install_regfilename = Install_regfilename64
UninstallRegDir = SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
End If
End Function
Schreiben der TeamViewer Registry-Keys
Function WriteRegistry(regfilename)
Shell.Run regedit /s & regfilename, 0,True
End Function
Function InstallTeamViewer()
MsgBox(Install)
Shell.Run msiexec.exe /i & chr(34) & msiPath & TvModuleName & chr(34) & /quiet, 0,True
End Function
Function RepareTeamViewer()
MsgBox(Repair)
Shell.Run msiexec.exe /fa & chr(34) & msiPath & TvModuleName & chr(34) & /quiet, 0,True
Shell.Run msiexec.exe /i & chr(34) & msiPath & TvModuleName & chr(34) & /quiet REINSTALL=ALL REBOOT=ReallySuppress, 0,True
End Function
*****
You can also compare above to below in WinMerge
Visual Basic-Quellcode
- Option Explicit
- Const TeamViewerVersion = "6.0.10194"
- Dim Shell, FSO, msiPath
- Set FSO = CreateObject("Scripting.FileSystemObject")
- Set Shell = WScript.CreateObject("WScript.Shell")
- ''''
- '''''''''''' DO NOT EDIT ABOVE THIS LINE ''''''''''''
- ''''
- 'msiPath = FSO.GetParentFolderName (WScript.ScriptFullName) & "\" 'Pfad aus Script-Namen extrahieren - Get path from script name!
- msiPath = "\\SERV14\SoftwareVerteilung\TeamViewerHost\" 'Pfad zur Netzfreigabe mit MSI-Packet - Path to network share containing the MSI files
- 'Const TvModuleName = "teamviewer.msi"
- Const TvModuleName = "teamviewer_host.msi"
- Const Regfilename32 = "tv-regfile32.reg" 'Reg-Datei von TeamViewer für 32-bit Systeme - Reg file for TeamViewer on 32-bit systems
- Const Regfilename64 = "tv-regfile64.reg" 'Reg-Datei von TeamViewer für 64-bit Systeme - Reg file for TeamViewer on 64-bit systems
- Const FORCEINSTALLATION = false 'TeamViewer immer Installieren/Aktuallisieren - install or update TeamViewer allways
- ''''
- '''''''''''' DO NOT EDIT BELOW THIS LINE ''''''''''''
- ''''
- Dim Install_regfilename32, Install_regfilename64, Install_regfilename, VersionCompare, UninstallRegDir
- Install_regfilename32 = chr(34) & msipath & Regfilename32 & chr(34) 'Reg-Datei von TeamViewer für 32-bit Systeme - Reg file for TeamViewer on 32-bit systems
- Install_regfilename64 = chr(34) & msipath & Regfilename64 & chr(34) 'Reg-Datei von TeamViewer für 64-bit Systeme - Reg file for TeamViewer on 64-bit systems
- CheckPlatform ' first of all check Plattform!!!
- VersionCompare = CheckInstalledTeamViewerVersion ' check current installed version
- If ((VersionCompare = 1) Or FORCEINSTALLATION) Then
- WriteRegistry Install_regfilename ' import registry settings
- End If
- If (VersionCompare = 1) Then
- InstallTeamViewer ' install newer or very first version
- Else
- If (VersionCompare = 0 And FORCEINSTALLATION) Then
- RepareTeamViewer ' reinstall same version
- End If
- End If
- ' Return Values
- ' -1 eine ältere Version - Older version
- ' 0 Gleiche Version - Equal version
- ' 1 neuere Version oder nichts installiert. - Newer Version or not yet installed
- Function CheckInstalledTeamViewerVersion()
- Dim objReg, arrSubkeys, strValue, installedVersionNumber, strSubkey, intRet
- CheckInstalledTeamViewerVersion = 1 'Assume newer version
- Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
- Set objReg = GetObject("winmgmts://./root/default:StdRegProv")
- objReg.EnumKey HKLM, UninstallRegDir, arrSubkeys
- For Each strSubkey In arrSubkeys
- intRet = objReg.GetStringValue(HKLM, UninstallRegDir & strSubkey, "DisplayName", strValue)
- If (intRet = 0) Then
- If strValue = "TeamViewer 6 (MSI Wrapper)" Or strValue = "TeamViewer 6 Host (MSI Wrapper)" Then
- objReg.GetStringValue HKLM, UninstallRegDir & strSubkey, "DisplayVersion", InstalledVersionNumber
- 'MsgBox(InstalledVersionNumber)
- If ( cint(Mid(TEAMVIEWERVERSION,5,Len(TEAMVIEWERVERSION)-4)) < cint(Mid(installedVersionNumber,5,Len(InstalledVersionNumber)-4)) ) Then
- CheckInstalledTeamViewerVersion = -1 'older version
- End If
- If ( cint(Mid(TEAMVIEWERVERSION,5,Len(TEAMVIEWERVERSION)-4)) = cint(Mid(installedVersionNumber,5,Len(InstalledVersionNumber)-4)) ) Then
- CheckInstalledTeamViewerVersion = 0 'equal verion
- End If
- End If
- End If
- Next
- End Function
- 'Überprüfung der aktuellen Plattform
- Function CheckPlatform()
- Dim regCheck, platform
- RegCheck = shell.regread("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")
- 'x86
- platform=InStr(RegCheck,"86")
- If platform >= 1 Then
- Install_regfilename = Install_regfilename32
- UninstallRegDir = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
- End If
- 'x64
- platform=InStr(RegCheck,"64")
- If platform >= 1 Then
- Install_regfilename = Install_regfilename64
- UninstallRegDir = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"
- End If
- End Function
- 'Schreiben der TeamViewer Registry-Keys
- Function WriteRegistry(regfilename)
- Shell.Run "regedit /s " & regfilename, 0,True
- End Function
- Function InstallTeamViewer()
- MsgBox("Install")
- Shell.Run "msiexec.exe /i " & chr(34) & msiPath & TvModuleName & chr(34) & " /quiet", 0,True
- End Function
- Function RepareTeamViewer()
- 'MsgBox("Repair")
- 'Shell.Run "msiexec.exe /fa " & chr(34) & msiPath & TvModuleName & chr(34) & " /quiet", 0,True
- Shell.Run "msiexec.exe /i " & chr(34) & msiPath & TvModuleName & chr(34) & " /quiet REINSTALL=ALL REBOOT=ReallySuppress", 0,True
- End Function
No comments:
Post a Comment