Script install Augmentt with client license as variable

Attempting to install Augmentt- their Powershell install script is:

mkdir “C:\Augmentt”

Invoke-WebRequest ‘<Insert URL to download .msi installer Here, Removing Angle Brackets>’-OutFile “C:\Augmentt\DiscoveryAgentSetup.msi”

sleep 10

msiexec /i C:\Augmentt\DiscoveryAgentSetup.msi /quiet /qn ‘WRAPPED_ARGUMENTS="/VERYSILENT /SUPPRESSMSGBOXES /extensionKey=<Insert License Key Here, Removing Angle Brackets>"’

rmdir /s C:\Augmentt

We don’t need the directory add/deletes and we have already added the file as a Syncro Script File. The client has a custom field on the customer called ‘Augmentt ID’. We created a platform variable $license to look at this field for the client. So we end up with:

msiexec /i C:\temp\DiscoveryAgentSetup.msi /quiet /qn ‘WRAPPED_ARGUMENTS="/VERYSILENT /SUPPRESSMSGBOXES /extensionKey=$license"’

This installs the software but does not pull the license. If we run this direct on a client and substitute the actual license for the variable $license then it works fine. Thoughts on how to get this to pass the variable via Syncro to the install?

msiexec /i C:\temp\DiscoveryAgentSetup.msi /quiet /qn ‘WRAPPED_ARGUMENTS="/VERYSILENT /SUPPRESSMSGBOXES /extensionKey=$license"’

The issue is your use of a single quote starting at Wrapped_Arguments. It’s causing it to read your variable literal instead of expanding it.

I thought the inside quotes would still allow it to be a variable. Thoughts on how to adjust so it works as intended?

Sorry, tried to edit my post and it’s too late lol so I deleted it. Anyway, see in the original how it wasn’t expanding the $license variable?

I would do it this way:
$Filename = “path\to\file”

Start-Process “msiexec.exe” -ArgumentList @("/i$($FileName)","/qn",“WRAPPED_ARGUMENTS= /VERYSILENT /SUPPRESSMSGBOXES /extensionKey=$License”) -NoNewWindow -Wait

I feel like this is getting closer. The remote machine that is receiving the script throws up a ‘Windows Installer’ help menu - like something isn’t formatted correctly. But I have no idea what needs adjusted.
You have to click ok on the window and then it completes in Syncro- no error but nothing gets installed.

My apologies. I overcomplicated things.

This line will work:

msiexec /i C:\temp\DiscoveryAgentSetup.msi /quiet /qn "WRAPPED_ARGUMENTS=`"/VERYSILENT /SUPPRESSMSGBOXES /extensionKey=$License`""

Closer still! It does install but doesn’t pass the license through so it is just a generic install that is not tied to the client. Your example against what the vendor recommended (yours has the license variable exposed correctly but looks like maybe all the arguments are ignored?) Just basing that on the coloring in syncro:

I have played around a bit with the quotes etc but havent been able to get the right combo yet (nor do I know enough about the context of scripting to get much further!)
Thanks for the assistance- grateful if you have any other ideas!

It’s strange because usually msi installing is super easy. I don’t know enough about this software to know but it should be passing the license. In the test I did it seemed to be expanding and passing it correctly. Strange.

Sorry for not replying sooner. Went to breakfast with the family. So, I got annoyed that this wasn’t working still when I know the various ways I provided should indeed have worked fine. So much so, that I went and did a trial of Augmentt LOL.

I’ve set this up through Syncro and I have it working fine. You can use this line:

msiexec /i E:\DiscoveryAgentSetup.msi /quiet /qn "WRAPPED_ARGUMENTS=`"/VERYSILENT /SUPPRESSMSGBOXES /extensionKey=$($license)`""

And I set up Syncro as such:

Now, 1 thing I did notice that seems a bit strange, is on a machine where I “failed” to properly install this the first test, even if I uninstalled and then ran the script above it would install, but didn’t seem to register in the portal. However, if I immediately run the script a second time and watch the processes, it seems to take longer and then trigger an update which then links it correctly to the Augmentt portal under the right company.

I even went as far as doing this via a batch file called via Powershell and passing the license through a variable and achieved the same results. Successful the first time on a machine that has never had this, but on a machine where it was previously installed, a 2nd run through forces it to show up in the online portal.

1 Like


I’ve been banging my head against the wall for a few days- I really appreciate your help. You certainly went above and beyond- you the man. We Marks need to stick together!

Have a great weekend-
thanks again-

1 Like