TeamViewer 14 Host MSI Installation

Hi all,

With TeamViewer 14 is uses extra parameters that I just can’t seem to get correct. See log out put from PowerShell…

[08-19-2019 14:46:23.783] [Installation] [Execute-Process] :: Executing[C:</ins>WINDOWS</ins>system32</ins>msiexec.exe /i C:</ins>Temp</ins>TeamViewer Hostv14.4.2669.0</ins>Files</ins>TeamViewer_Host.msi REBOOT=ReallySuppress /QNCUSTOMCONFIGID=“xxxxxx” IMPORTREGFILE=“1” APITOKEN=“xxxxxx-xxxxxxxxxxxxxxxxxxx” [ASSIGNMENTOPTIONS=""–alias %COMPUTERNAME% --grant-easy-access --reassign""] /L*vC:</ins>WINDOWS</ins>Logs</ins>Software</ins>TeamViewer_Host_Install.log]

PSAD log error…
[Installation] :: Execution failed with exit code [1639]: Invalid command line argument. Consult the Windows Installer SDK for detailed command line help. Execute-Process 19/08/2019 2:46:28 PM 18776 (0x4958)

Here is my command…
Execute-MSI -Action Install -Path ‘TeamViewer_Host.msi’ -AddParameters ‘CUSTOMCONFIGID=“xxxxxx” IMPORTREGFILE=“1” APITOKEN=“xxxxxx-xxxxxxxxxxxxxxxxxxx” [ASSIGNMENTOPTIONS=""–alias %COMPUTERNAME% --grant-easy-access --reassign""]’

New to PSAD.

Hello,

Your Execute-Msi command’s is not correct.

please try this
Execute-MSI -Action Install -Path ‘TeamViewer_Host.msi’ -Parameters “CUSTOMCONFIGID="xxxxxx” IMPORTREGFILE="1" APITOKEN="xxxxxx-xxxxxxxxxxxxxxxxxxx" [ASSIGNMENTOPTIONS="“–alias %COMPUTERNAME% --grant-easy-access --reassign"”]"

I don’t know command line about teamviewer product (to verify) but your powershell syntax is not correct.

Below is what I am meant to use from TeamViewer but my understanding is that I need to put some of the attributes in " ". However if I install via command line this is the parameters I need to use.

msiexec /i “TeamViewer_Host.msi” /qn CUSTOMCONFIGID=xxxxxxx IMPORTREGFILE=1 APITOKEN=xxxxxxx-xxxxxxxxxxxxxxxxxxx ASSIGNMENTOPTIONS="–alias %COMPUTERNAME% --grant-easy-access --reassign"

Does this change within PSADT?

When you enter parameter commands, you must put"…" and if in your command line you also have"…" you must use "..."

Sorry I think I follow but based on the parameters that I have supplied are you able to give me what I need to put into PSADT?

I am trying but seems like I am missing something.

The last time I wrapped TV was TV12 and before I used PSADT. Using the toolkit, my first draft would be this:

Execute-MSI -Action Install -Path "TeamViewer_Host.msi" -Parameters "/qn" -AddParameters 'ASSIGNMENTOPTIONS="–alias %COMPUTERNAME% --grant-easy-access --reassign"' -SecureParameters 'CUSTOMCONFIGID=“xxxxxx” IMPORTREGFILE=“1” APITOKEN=“xxxxxx-xxxxxxxxxxxxxxxxxxx”' -PassThru

Look at your string, notice how you aren’t placing single/double quotes correctly.

In powershell, double-quotes indicate a string (" "), whereas single-quotes (’ ') indicate a literal string–with single quotes, powershell will not substitute or translate anything within them, regardless if there is syntax written.

More info on MS Docs: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-6

With the quotes as I have placed them here, the PSADT script will pass the literal strings in the parameters into a command–where they will then be translated because the outermost quotes themselves don’t pass through. This results in msiexec receiving the following string (more or less):

msiexec /i TeamViewer_host.msi /qn ASSIGNMENTOPTIONS="–alias %COMPUTERNAME% --grant-easy-access --reassign" CUSTOMCONFIGID=“xxxxxx” IMPORTREGFILE=“1” APITOKEN=“xxxxxx-xxxxxxxxxxxxxxxxxxx”

The bold part actually comes through as a codeblock for base64 decode (I think) because -SecureParameters will ‘encrypt’ parameters set there (best practice for any API keys, passwords, etc you pass using PSADT).
Please test the above command and reply back with results. I have something of a crusade against TV and will help you till we get it right.

Ok it seems to run now but nothing is installing. I have zip up the package for you to download and have a look.

See below link to download full package including files etc.

This package will install a special v13 and then uninstall. This v13 package upgrades over the top of the existing v13 and then uninstalls to remove the TV Wrapper that was used in installing TV in the past.

With v14 that have changed the installer to have a more cleaner install and uninstall…

Let me know if you see anything… As I don’t receive any errors within Powershell but v14 doesn’t seem to be installing…

Remove your dropbox link and re-post with redacted config/API information.

For the record: I have these files currently, so I’d suggest making new ones anyway. Not that I’d do anything with them, but better to be secure.

I’m thinking there’s a better way to standardize your deployments than installing/uninstalling v13 in the beginning. Just my $.02

I thought I did post with redacted config/API… Thanks for letting me know. I have since re-posted…

My deployment is standardized on v13.0.6447 but this version is not able to be upgraded directly to v14… When discussing with TeamViewer they said when running the uninstaller from v13.0.6447 this doesn’t remove the wrapper so installing v14 will fail.

Their fix was install v13.1 which can upgrade over v13.0.6447 and then uninstall. This removes the wrapper and allows v14 to install…

Ugly but seems to work. Now just need to get the script to install so I can push out via SCCM.

Any help would be appropriated. .

Okay, after a few tests I was able to run through with no errors. For some reason I forgot secureparameters was a switch, not an input. PSADT was passing through extra parameters because of this and msiexec translated this as pointing to a transform, thus the failures. I never get it on the first draft :frowning: but I’ll take success on the 2nd attempt as a win.

Fixed:

Execute-MSI -Action Install -Path "TeamViewer_Host.msi" -AddParameters 'ASSIGNMENTOPTIONS="–alias ($HOSTNAME) --grant-easy-access --reassign" CUSTOMCONFIGID=“REDACT” IMPORTREGFILE=“1” APITOKEN=“REDACT”' -PassThru

Note: In this command I replaced %COMPUTERNAME% with ($HOSTNAME) as this is the powershell variable, but if the TV MSI explicitly expects %COMPUTERNAME% use that instead. Potato tomato.

Also also, I removed the QN and just let PSADT handle that. I have removed the default parameters completely from my production XML so it’s just habit for me to include.

Here’s my deployment of the thing I replaced TV with in my environment. The pre-installation section may give you some inspiration on unifying your installs. My first deployment of this was sort of a rushed mess since we pushed it to replace TV with basically emergency haste. This came afterward to clean things up once I had time to do it proper.

I remember that same issue from my old TV12 wrapper (pre-PSADT for me), I had the uninstall section written as a loop so that it would grab everything, and it also copied some TV DLL file from my source share because secondary uninstalls would fail without it. Was a lot cleaner IMO than install/uninstall.

Still not installing. Seems to run through the install and uninstall of 13.1 but doesn’t install v14 even after replacing with new code above (replacing with my config/API)…

Can you share the “Deploy-Application.ps1” with me and I will replace mine…

Here’s my old TV wrapper, it’s the latest I could find in my personal file history (the final was purged with replacement)

That’s super weird, I literally was on your quickjoin a minute ago. Something else is broken here. What PoSh version are you running?

This post was basically just dropbox links and has been removed by user.

Ok will download and have a look…

I am running PSVersion 5.1.18362.1 to answer your question above. While I have a look next question is that I would like to start TV up once installed.

I would like to start it up as log in user (not SCCM user). Can this be added to script?

You don’t actually want TV host running as a local user, you want it running as SYSTEM. That being said, I don’t think PSADT has this functionality (this actually really difficult/hacky to do in PoSh on purpose). For the record, SCCM uses SYSTEM to install when deployed to a machine target, but it uses the local context for user targets (Windows installer actually will self-elevate using SYSTEM to pass UAC prompts when using the user context). I have no clue how this works, but that’s what happens during user-targeted deployments from Software Center.

Citation: https://home.configmgrftw.com/user-context-in-configmgr-2012-applications/

As to your other question; TV host actually installs as a service, so it will launch itself upon install.

Get it working? 20char

Ok ran your script and will not luck with v14… Not sure why in my environment it doesn’t want to install. See logs.

With regards to starting TV yes I understand it will start automatically it was more just a query then anything for other applications…

MSIexec is returning 1603 for you. This usually indicates the app is already installed. In fact, here’s the relevant entry from your own MSIexec log:

MSI (s) (34:4C) [09:07:18:284]: Doing action: FindRelatedProducts
Action start 9:07:18: FindRelatedProducts.
MSI (s) (34:4C) [09:07:18:286]: PROPERTY CHANGE: Adding TEAMVIEWER_FULL_FOUND property. Its value is '{FE8C77BE-A8BE-4522-A2E3-9DB831B3DB96}'.
MSI (s) (34:4C) [09:07:18:286]: FindRelatedProducts: current install is per-machine.  Related install for product '{08C3C35D-2A94-4B33-800C-73B88423EB8D}' is per-user.  Skipping...
MSI (s) (34:4C) [09:07:18:287]: Doing action: ExitIfIncompatibleSoftwareDetected
Action ended 9:07:18: FindRelatedProducts. Return value 1.
Action start 9:07:18: ExitIfIncompatibleSoftwareDetected.
MSI (s) (34:4C) [09:07:18:288]: Product: TeamViewer 14 Host -- An incompatible TeamViewer package was detected that conflicts with the current MSI package. Please manually uninstall this package.

An incompatible TeamViewer package was detected that conflicts with the current MSI package. Please manually uninstall this package.
Action ended 9:07:18: ExitIfIncompatibleSoftwareDetected. Return value 3.
Action ended 9:07:18: INSTALL. Return value 3.

MSIexec seems to think you have another TV14 install, perhaps user-targeted. Do you have the full-fat TV client installed on your test machine, perhaps? That’s where I’d bet your problem is.

Also, Are you a Windows insider? According to TV14’s compatibility chart, 14.5+ is required for Win10 1903 (though, I have 1903 release version and it worked fine). In the below link, see Windows section, 3rd footnote

Also also, the logs contain your api/config info, so at this point I’d definitely suggest making new ones.

No this machine doesn’t have full in fact it doesn’t have anything installed. It runs through the v13.1 install and uninstall (this wouldn’t install either if v14 was installed but it does).

No this machine is Windows 10 1903 released OS.

So hit and miss which is doesn’t give me confidence when I want to push out to 300 machines…