Posted by seahose
Henagon

Easy Access Requesting Password

Hi there

I'm sure I'm missing something obvious here but since the most recent host installations and and additions of TeamViewer 13 including 13.2 the Easy Access feature now requires a password for unattended access of clients.  What's odd is that the box is ticked under each host and access granted to myself and other admins.

 Is there something else besides the --grant-easy-access switch that needs to be implemented during the install or could there be some form of corruption somewhere?

My installation parameters are as follows:
msiexec /qr /i TeamViewer_Host.msi /L*E C:\TVlogfile.log /norestart CUSTOMCONFIGID=******* APITOKEN=********** ASSIGNMENTOPTIONS="--grant-easy-access --reassign"

A number of the hosts I support are in far to reach places so user intervention really isn't ideal.

Additionally the options --wait "10" and --alias "${COMPUTERNAME}" do not appear to be accepted.

Any help woild be greatly appreciated.

Many Thanks

8 Replies
8 Replies
Posted by RCT_IT
Trigon

Re: Easy Access Requesting Password

Hey Seahorse,

We too are experiencing the same issue with our clients and what’s worse is that they are on the latest which of current is v14.1.3399

The quick fix I’ve found so far is to log into your TV management console, select the shared group you are having trouble with and select the share tab, inside will show the current permissions for the group including yourself with full control, simply remove yourself and click save, then perform the same steps again except this time add yourself with full control and click save. You’ll notice you can now log in again with easy access?

This is definitely a bug that needs to be fixed in the upcoming versions.....
Posted by RCT_IT
Trigon

Re: Easy Access Requesting Password

Hey Seahorse,

For the script you use to assign to machines it needs to have Windows environment variables for e.g this will put the name of the computer in the group when you go to assign it:
--alias “%USERNAME% (%COMPUTERNAME%)” the name in the console will show as:
Joe Bloggs (LT-12345678)
This is the new formatting for TV 14 moving forward.

Please see this article for more information describing the changes to the way TV 14 is deployed:

https://community.teamviewer.com/t5/Knowledge-Base/Mass-deployment-improvements/ta-p/39639
Posted by seahose
Henagon

Re: Easy Access Requesting Password

Hi RCT

Thank you for responding to my query, this does answer a number of my concerns and I will certainly give your suggestions a go.  The way we've deployed TV in the past would allow for new clients to be created and the Computer Host name placed within the Unassigned directory.  We'd then manually add the username to the host by hand.  If the client computer was reimaged with the same hostname TV would retain the hostname and username with requireing further action. This does seem to be working again now so fingers crossed.  Just following your example could I use the following instead? 

--alias “ %COMPUTERNAME% (Insert UserN)”

Many Thanks

 

Seahorse

 

Posted by RCT_IT
Trigon

Re: Easy Access Requesting Password

Hi Seahorse,

Is it Seahorse or Seahose?

Not a problem. That's exactly what we too have implemented in our corporate environment where TV simply runs on the host machine and then assigns the windows environment variables that we specify along with the computer name variable to the machine and then it adds it to one of our TV groups.

As for the example use the below formatting:

Insert the user profile variable like this with quotation marks added

--alias "%COMPUTERNAME% (%USERPROFILE%)"

OR

--alias "%USERPROFILE% (%COMPUTERNAME%)"

Regards,

RCT_IT

Posted by RCT_IT
Trigon

Re: Easy Access Requesting Password

EDITED by moderator:

Got this reply from the TeamViewer Support team:

Dear Jarrad,

Thank you for your message.

I have escalated this issue and confirmed that there is an issue with the current 'Grant easy access' feature as you have reported.
Our developers are working on this matter to be able to release the fix.

As for the work around, you seemed to have already found this on your own.
You may also set a password and deploy them to each device so that you can connect through password as well.. 

We will contact you as soon as we receive further information or fix. 
We apologise for any inconvenience caused.

Posted by seahose
Henagon

Re: Easy Access Requesting Password

Thank you for your continued advice.

Indeed, your observation is correct it should be Seahorse but I appear to have missed a character. **SIGH**

I believe I'm there with the ALIAS now thank you, however as I touched on before how do you find reinstalling TV on an existing client? Is TV Console intligent enough to recognise that the host is prexisting and simply retain its ALIAS and Group Settings? It seems to work but on occasion we have observed duplicates.  I've removed the --reassign flag from the install.

Many Thanks

 

Seahorse

Posted by RCT_IT
Trigon

Re: Easy Access Requesting Password

Hi Seahorse,

Not a problem mate.

Couple of things:

In our script, we haven't found much use for the ReloadTV settings command and can't find a way to incorporate it into our scripts.

As for your other question about pre-existing machines in the TV computers & contacts console we too have tried running our scripts without the reassign flag and it does work but we've decided to go about cleaning up TV rather than going over the top of it as you never know what botched version of TV is installed?

With your question to re-installing TV specifically the HOST after many trial and errors, we've had to modify our .BAT script numerous times to get it right and have finally found a fix for mainly the Grant Easy Access feature in TV, the trick is to to wait 20 secs and then have the assignment command pushed down to the last part of the script, please see below my entire script for deploying the TV_HOST onto our machines:

MD C:\ITSupport\Logs
SET logfile="C:\ITSupport\Logs\TV_Host_SOE.LOG"
ECHO Batch command: %0 %* >%logfile%
ECHO -------------------------------------- >> %logfile%
ECHO Started at %date% %time% >> %logfile%
ECHO -------------------------------------- >> %logfile%

ECHO Registry check if TV already Exists? >> %logfile%

SET key=HKLM\SOFTWARE\WOW6432Node\TeamViewer
REM Checking if OLD TV Version exists?
reg query %key% /f "*"
if %errorlevel% EQU 0 goto :UNINSTALL_OLD_TV
GOTO :SOE

:UNINSTALL_OLD_TV
::Kills TeamViewer Services
ECHO OLD TV detected, moving to UNINSTALL_OLD_TV Profile >> %logfile%
Taskkill /T /F /IM TeamViewer.exe >> %logfile%
Taskkill /T /F /IM TeamViewer_Service.exe >> %logfile%
Taskkill /T /F /IM tv_w32.exe >> %logfile%
Taskkill /T /F /IM tv_x64.exe >> %logfile%

::If you get access denied
wmic process where "name='TeamViewer.exe'" delete >> %logfile%
wmic process where "name='TeamViewer_Service.exe'" delete >> %logfile%
wmic process where "name='tv_w32.exe'" delete >> %logfile%
wmic process where "name='tv_x64.exe'" delete >> %logfile%

::Wait 5 seconds before next step
TIMEOUT /T 5 /NOBREAK >> %logfile%

::Kills TeamViewer Services again because they restart automatically
Taskkill /T /F /IM TeamViewer.exe >> %logfile%
Taskkill /T /F /IM TeamViewer_Service.exe >> %logfile%
Taskkill /T /F /IM tv_w32.exe >> %logfile%
Taskkill /T /F /IM tv_x64.exe >> %logfile%

::If you get access denied
wmic process where "name='TeamViewer.exe'" delete >> %logfile%
wmic process where "name='TeamViewer_Service.exe'" delete >> %logfile%
wmic process where "name='tv_w32.exe'" delete >> %logfile%
wmic process where "name='tv_x64.exe'" delete >> %logfile%

::Uninstalls old MSI TeamViewer 14 Host v14.0.13880.0 silently
MsiExec.exe /X{C0EF0E8A-161A-4F58-9CA1-AD66FE998DC9} /quiet
ECHO TeamViewer 14 Host v14.0.13880.0 uninstalled successfully >> %logfile%

::Uninstalls old MSI TeamViewer 14 Host v14.1.3399.0 silently
MsiExec.exe /X{33FA9C32-AD30-4121-8170-B4D880B71AD1} /quiet
ECHO TeamViewer 14 Host v14.1.3399.0 uninstalled successfully >> %logfile%

::Uninstalls Old versions of TeamViewer silently
IF EXIST "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" GOTO TV32
ECHO OLD TeamViewer 14 Host x32-Bit Detected moving to TV32 Uninstaller >> %logfile%
IF EXIST "C:\Program Files\TeamViewer\TeamViewer.exe" GOTO TV64
ECHO OLD TeamViewer 14 Host x64-Bit Detected moving to TV64 Uninstaller >> %logfile%

:TV32
"C:\Program Files (x86)\TeamViewer\uninstall.exe" /S
ECHO OLD TeamViewer Host x32-Bit has been removed successfully >> %logfile%
GOTO :UNINSTALLREG
:TV64
"C:\Program Files\TeamViewer\uninstall.exe" /S
ECHO OLD TeamViewer Host x64-Bit has been removed successfully >> %logfile%
GOTO :UNINSTALLREG

:UNINSTALLREG
::Delete all leftover TeamViewer Registry keys
REG DELETE HKLM\Software\TeamViewer /f
REG DELETE HKCU\Software\TeamViewer /f
REG DELETE HKLM\Software\Wow6432Node\TeamViewer /f
ECHO TeamViewer Host Registry Remnant Files cleaned up Successfully >> %logfile%

::Delete all leftover TeamViewer folders
RD /S /Q %APPDATA%\TEAMVIEWER >> %logfile%
RD /S /Q %TEMP%\TEAMVIEWER >> %logfile%
RD /S /Q "C:\Program Files\Teamviewer" >> %logfile%
RD /S /Q "C:\Program Files (x86)\TeamViewer" >> %logfile%

::This command specifies a wildcard to delete all old TeamViewer Shortcuts
DEL /s /q /f "%PUBLIC%\Desktop\*TeamViewer*.lnk" >> %logfile%
DEL /s /q /f "%USERPROFILE%\*TeamViewer*.lnk" >> %logfile%
ECHO Uninstallation of OLD TV Completed Successfully, now moving to SOE Profile >> %logfile%
GOTO :SOE

:SOE
::Installs TeamViewer Host silently
ECHO TV not detected, moving to SOE Profile >> %logfile%
TeamViewer_CustomRCT_Host_Setup.exe /S
ECHO TeamViewer Host installed successfully >> %logfile%

::Loads TeamViewer specified settings in Registry.
REGEDIT /S TV_Host_Settings.reg
ECHO TeamViewer Host Registry Settings Imported Successfully >> %logfile%

::This will do the check on whether the machine can communicate with the domain, if not then refer to :TVRemote
IF EXIST "\\RCT.LOCAL\NETLOGON" (ECHO RCT.LOCAL is available & GOTO :TVDomain_REGISTER) ELSE (ECHO RCT.LOCAL is not available & GOTO :UNATTENDED_PASSWORD)

::Reads DC and grabs the DisplayName for the current logged in user and puts the result into a txt file
:TVDomain_REGISTER
setlocal ENABLEEXTENSIONS
for /f "usebackq tokens=2,* delims= " %%a in (`net user "%USERNAME%" /domain ^| find /i "Full Name"`) do set FULLNAME=%%b
ECHO %FULLNAME% > %temp%\fullname.txt
ECHO Read USERNAME from DC successfully >> %logfile%

::Runs PowerShell and writes the DisplayName result as a registry value BuddyDisplayName
PowerShell.exe -ExecutionPolicy Bypass -File "Create_TVBuddyDisplayName.ps1" -WindowStyle Hidden
ECHO Created the TVBuddyDisplayName registry key successfully >> %logfile%
PowerShell.exe Set-ExecutionPolicy Undefined
ECHO Set PowerShell Execution Policy to Undefined Successfully >> %logfile%
PowerShell.exe set-executionpolicy -scope CurrentUser -executionPolicy Undefined -force
ECHO Set PowerShell Execution Policy for CurrentUser to Undefined Successfully >> %logfile%
PowerShell.exe set-executionpolicy -scope LocalMachine -executionPolicy Undefined -force
ECHO Set PowerShell Execution Policy for LocalMachine to Undefined Successfully >> %logfile%

::Sets the location of which registry keys to read
set KEY_NAME=HKCU\Software\TeamViewer
set VALUE_NAME=BuddyDisplayName
ECHO Set the location to BuddyDisplayName in Registry Successfully >> %logfile%

::Turns the reg key value into a readable variable
FOR /F "tokens=2*" %%A IN ('REG.exe query "%KEY_NAME%" /v "%VALUE_NAME%"') DO (set BUDDYDISPLAYNAME=%%B)
ECHO Set BuddyDisplayName as a Variable Successfully >> %logfile%
GOTO UNATTENDED_PASSWORD

:RELOADTV
::This will reload TeamViewer registry settings
IF EXIST "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" GOTO RELOADTV32
ECHO TeamViewer Host x32-Bit detected moving to RELOADTV32 >> %logfile%
IF EXIST "C:\Program Files\TeamViewer\TeamViewer.exe" GOTO RELOADTV32
ECHO TeamViewer Host x64-Bit detected moving to RELOADTV64 >> %logfile%

:RELOADTV32
START /wait "Reload Settings" "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" --ReloadSettings
ECHO TeamViewer Host x32-Bit has been reloaded successfully >> %logfile%
GOTO :END
:RELOADTV64
START /wait "Reload Settings" "C:\Program Files\TeamViewer\TeamViewer.exe" --ReloadSettings
ECHO TeamViewer Host x64-Bit has been reloaded successfully >> %logfile%
GOTO :END

:UNATTENDED_PASSWORD
::This will restart TeamViewer which will re-assign the machine to the IT account & Setup the Unattended Password
REGEDIT /S TV_Host_Unattended_Password.reg
ECHO TeamViewer Host Unattended Password Registry Settings Imported Successfully >> %logfile%
NET STOP TeamViewer && NET START TeamViewer
ECHO TeamViewer Host has stopped and restarted Successfully >> %logfile%

::This will do the check on whether the machine can communicate with the domain, if not then refer to :TVRemote
IF EXIST "\\RCT.LOCAL\NETLOGON" (ECHO RCT.LOCAL is available & GOTO :TVDomain) ELSE (ECHO RCT.LOCAL is not available & GOTO :TVRemote)

:TVDomain
::Wait 20 seconds before next step
TIMEOUT /T 20 /NOBREAK >> %logfile%

::This will assign the remote machine to TeamViewer silently to the group below after TeamViewer_Service.exe brings up TeamViewer.exe
START /wait "Teamviewer Assignment" "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assign --API-TOKEN 4827941-tk72SUsYIFeF0ThVAUqy --reassign --grant-easy-access --group "RCT Staff Machines" --alias "%BUDDYDISPLAYNAME% (%COMPUTERNAME%)"
ECHO TeamViewer Host Domain Profile assigned to the machine Successfully >> %logfile%
GOTO END

:TVRemote
::Wait 120 seconds before next step
TIMEOUT /T 20 /NOBREAK >> %logfile%

::This will assign the remote machine to TeamViewer silently to the group below after TeamViewer_Service.exe brings up TeamViewer.exe
START /wait "Teamviewer Assignment" "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assign --API-TOKEN 4827941-tk72SUsYIFeF0ThVAUqy --reassign --grant-easy-access --group "RCT Staff Machines" --alias "%USERNAME% (%COMPUTERNAME%)"
ECHO TeamViewer Host Remote Profile assigned to the machine Successfully >> %logfile%
GOTO END

:END
::Kills & Deletes all old versions of TeamViewer Setup files like TeamViewer Host, Full, etc.
Taskkill /F /IM "TV_Host_SOE.exe"
DEL /s /q /f "%USERPROFILE%\*TV_Host*.exe" >> %logfile%
DEL /s /q /f "%USERPROFILE%\*TeamViewer*.exe" >> %logfile%
DEL /s /q /f "%USERPROFILE%\*TV_Full*.exe" >> %logfile%
DEL /s /q /f "%TEMP%\fullname.txt" >> %logfile%
DEL /s /q /f "%TEMP%\Create_TVBuddyDisplayName.ps1" >> %logfile%

echo -------------------------------------- >>%logfile%
echo Finished at %date% %time% >>%logfile%
echo -------------------------------------- >>%logfile%

::Comment out opening the log if not IT Troubleshooting
::start /max notepad "C:\ITSupport\Logs\TV_Host_SOE.LOG"
FOR /D /R %TEMP% %%X IN (*.tmp) DO RD /S /Q "%%X"

Posted by seahose
Henagon

Re: Easy Access Requesting Password

Hi RCT

That is some script you have there, thank you for sharing.
I may well adapt it for our needs.

Interstingly each of my scripts is now failing to apply licensing information since the last 2 updates of TV.

In terms of deploying TV on mass do you use this script at startup or an adapted version or do you simply rely on manual installation ad-hoc?

We were hoping to roll out something like this to clear previous versions as start and install the new one.  This of course would be messy as it would create a bunch of hosts by hostname only without any independant group assignments.

To be quite frank I'm mythed at how complicated it is to roll this product out in a corporate environment.

Thanks

Seahorse