a little tutorial to create a trendmicro-installer for macOS deployment - with pkgbuild (of course u can use any other tool)
- Go to the Trend Micro Security Website (with Safari)
- Click Device and choose your Device Group
- Click Add Devices and choose under Install to this Device -> Install
- Next step click Download and download the package on your mac.
- Go to the Trend Micro Security Website, click on Device and choose your Device Group
- Click Add Devices again and choose under Download the Installer Package (Advanced) -> For Service Providers
- Get your Identifier by clicking on the button Copy Identifier
- Put the Identifier in a plist file. Replace "PutYourIdentifier" parameter with your Identifier. (Use my default plist file in the repo)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Identifier</key>
<string>#PutYourIdentifier</string>
</dict>
</plist>
- first, we need the following directory tree:
e.g. Desktop
└── TrendMicroAgent
└── script
└── postinstall
└── ROOT
└── var
└── tmp
└── TrendMicro
├── Identifier.plist
└── WFBS-SVC_Agent_Installer.pkg
- We need the postinstall file. This file ensures that the WFBS-SVC_Agent_Installer.pkg is installed
#!/bin/sh
## postinstall
installer -pkg /var/tmp/TrendMicro/WFBS-SVC_Agent_Installer.pkg -target /
exit 0 ## Success
exit 1 ## Failure
- We have the tree and we have also the postinstall file, the WFBS-SVC_Agent_Installer.pkg and the Identifier.plist. Put the files in the appropriate directories. Now, ensures that the right permissions are granted.
cd TrendMicroAgent
sudo chown -R root:wheel *
chmod a+x scripts/
- Now run the following command (while you are the TrendMicroAgent directory)
pkgbuild --root ROOT/ --identifier de.salihzengin.trendmicro --version 1.0 --nopayload --scripts scripts/ "TrendMicroDeploy.pkg"
A few seconds later, you get the following output:
pkgbuild: Adding top-level postinstall script pkgbuild: Wrote package to TrendMicroDeploy.pkg
You are done! Finally you can test your package.
(of course, you could sign your package with productsign
)
productsign --sign "Developer ID Installer: Your Developer Name (1A2B3C4D5E)" TrendMicroDeploy.pkg TrendMicroDeploy_signed.pkg
Note: It could be that the application only starts, if the Mac has been restarted before.