ConnectWise Automate Silent Installation Woes

DFree
New Contributor III

Does anyone else here use ConnectWise Automate (ie - not the standalone Screenconnect product)?

I'm having trouble doing a clean and silent install for both the Remote Agent and the ConnectWiseControl piece.

Looking for advice on how to roll forward with a silent installation of both of these pieces of ConnectWise Automate (CWA), so that they appear and work with our console correctly.

What I currently have and what I'm currently seeing:
When logged into the CWA Console, I am able to download the MacOS Agent installer that is setup to put the device into our instance of CWA.

I have the following related PPPC Config Policies (Created used the latest PPPC Utility) in place:
PPPC for bash:
identifier: /bin/bash
identifier type: Path
code requirement: identifier "com.apple.bash" and anchor apple
Accessibility- ALLOW
AppleEvents- ALLOW
com.apple.systemevents
BundleID / identifier "com.apple.systemevents" and anchor apple

PPPC for LTechAgent:
identifier: /usr/local/ltechagent/ltechagent
identifier type: Path
code requirement: identifier "com.labtechsoftware.ltechagent"
Accessibility- ALLOW
AppleEvents- ALLOW
com.apple.systemevents
BundleID / identifier "com.apple.systemevents" and anchor apple

AppleEvents- ALLOW
com.apple.systemuiserver
BundleID / identifier "com.apple.systemuiserver" and anchor apple

AppleEvents- ALLOW
com.apple.finder
BundleID / identifier "com.apple.finder" and anchor apple

PPPC for ConnectWiseControl:
identifier: com.screenconnect.client.access
identifier type: Bundle ID
code requirement: identifier "com.screenconnect.client.access" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] / exists / and certificate leaf[field.1.2.840.113635.100.6.1.13] / exists / and certificate leaf[subject.OU] = K8M3XDZV9Y
Accessibility- ALLOW
AppleEvents- ALLOW
com.apple.systemevents
BundleID / identifier "com.apple.systemevents" and anchor apple

AppleEvents- ALLOW
com.apple.systemuiserver
BundleID / identifier "com.apple.systemuiserver" and anchor apple

AppleEvents- ALLOW
com.apple.finder
BundleID / identifier "com.apple.finder" and anchor apple

I use a Jamf policy to place the Agent installer in /tmp/ and then run a script afterwards that does:

#!/bin/sh
sudo installer -pkg "/tmp/LT/LTvc.mpkg" -target /
sudo rm -rf /tmp/LT/

When checking the Jamf logs, it says the script is in a "Completed" status, but I see the following error:

Script result: installer: Package name is <br/>installer: Installing at base path /<br/>installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)<br/>

There appears to be a bug here....How can I troubleshoot the error that caused the installation to fail? Interestingly...

The Remote Agent seems to install perfectly, but the ConnectWiseControl portion does not. It requires me to go into the console, wait for the Mac to show up, and then click Control. Clicking control then asks me if I want to install ConnectWiseControl. When I click yes, I then see the following prompt:
32e7e289a789468d9dad14a0fcf33679

When I do nothing, the message goes away, but I check /opt, I see the ConnectWiseControl software there. Double clicking it makes CWC work fine.

As for this second message (related to PPPC), where is this instance of ltechagent located? It's obviously not in the same path I have in the configuration profile above, or else it would just be approved.

The best overall solution here would be to figure out what is causing the installer to produce a failure. Is it related to ControlWiseConnect? Is that Agent installer supposed to also install the ConnectWiseControl software in addition to the Monitoring Agent?

TIA.

10 REPLIES 10

Tbone082512
New Contributor

How did you connect the Config.SH scripting with the package? Automate needs both to function (and install ;) ) properly

spyguitar
New Contributor

I've got the Agent silent installation working, using two Packages and two Computer Policies. The packages are just the contents of the LTechAgent.zip downloaded from your Connectwise Automate web console. The first policy stages the LTSvc.mpkg installer and the config.sh settings file, and then triggers the second policy. The second policy runs the LTSvc.mpkg installer from cache (which looks for config.sh, and finds it in the same cache location).



Package 1: LTSvc.mpkg
Package 2: config.sh

Policy one: Stage CWA Agent install and config
- Set to run on recurring check-in, once per computer
- Packages section: set both packages above to Cache
- Files and processes - execute command: "jamf policy --trigger [second policy trigger]"

Policy two: Install CWA Agent
- Set to run on custom trigger, as set above, ongoing on all computers
- Packages: LTSvc.mpkg, Install Cached



I've also deployed your PPPC profile above; the only thing I'm missing so far, I think, is getting the screen recording permissions working. At the moment, the first time I connect to a Mac with Control, it requests screen recording permissions from the user. Not the end of the world but I'd like to fix it.

Hey Jamf/mac newbie here. I  tried following the instructions here

I created the packages with composer. 

package 1 has: LTSVC.mpkg

package 2 has : config.sh

Policy one has both packages attached  and all settings above

I have the files and processes set to execute a command

jamf policy --event App - ConnectWiseAutomate 

ConnectWiseAutomate 2 is the name of the 2nd policy. I am not sure if the error is in my command and triggers but I the info i found said the tirgger could be anything i have tried shortening it and changing it but any help would be greatly appreciated.

The second policy trigger  is "App - ConnectWiseAutomate".

I am getting results that the first policy has completed successfully but the 2nd policy isn't running and the app isn't being installed.

 

KeithM
New Contributor

Did anyone get this working? I have the exact same issue. I want CWC to install silently.

TannerJ
New Contributor

@spyguitar (@spyguitar )

That looks like an awesome fix! I have a question about a workaround. I attempted to create a package with the config.sh file from llink; however, Jamf doesn't allow me to create a package with a sh file. I even tried it as the manifest file and that didn't work. Did you do something differently while configuring the package? I hope to hear from you soon.

wildfrog
Contributor II

I had to tackle this recently for a client and used one package & one script.

Created a package with a payload that puts LTSvc.mpkg & config.sh into a folder inside /Users/Shared/

Set up a policy which runs at recurring checkin & once per computer that installs the above package and a Files & Processes execute command to silently call the newly-placed LTSvc.mpkg which is now in the same folder as the config.sh file it needs.

Ahead of that I’d deployed PPPC profiles for the Labtech agent & CW Control.

TannerJ
New Contributor

@wildfrog Do you mind uploading in-depth instructions on how you accomplished this? What was the execute command you used? I found this one online "sudo installer -store -pkg "/User/MyName/Desktop/YourPackageHere.pkg -target /". That command might work. The rest makes a lot of sense. I hope to hear from you soon. Thanks!

wildfrog
Contributor II

Sorry for delay

First. . .I used Packages.app to create a pkg which puts the the LTSvc.mpkg and config.sh file into /Users/Shared/
Then I created a policy which runs at enrollment complete, recurring checkin, and a custom trigger set to Once Per Computer that does the following -

  • Installs/executes the pkg mentioned above (which puts those two items into /Users/Shared/
  • In Files & Processes executes this command - installer -pkg /Users/Shared/Labtech/LTSvc.mpkg -target /
  • Then set the Maintenance payload to do a recon.

Basically I just have a package that puts the CW Manage bits into the same folder on the endpoint. . .then use the Files & Processes command to execute the LTSvc mpkg once it's on the endpoint colocated with the config file it needs.

user-yTBdTpSSSo
New Contributor

For Automate, I wrote a script that downloads the current installer. Get the URL for the downloader from Automate and replace it.

mkdir /tmp/ltagent
cd /tmp/ltagent
curl -sS https://rmm.acme.com/LabTech/Deployment.aspx?InstallerToken=XXXXXXXXXXXXXXXXXX > ltagent.zip
unzip ltagent.zip
sudo installer -pkg ltsvc.mpkg -target /
rm *
cd .
rmdir /tmp/ltagent

This link downloads the PPPC that you can use for your config. https://control.product.connectwise.com/uploaded/file/18214/1/3341/7968ddcef831e48293bee6e9cece64b6....

Does this still work for you? I am having difficulty getting this to work