Triggering a package with a script

I
IK
IK

How can I reinstall a package that failed using a script? Is it possible?

a month ago
SOTI MobiControl
ANSWERS
OS
Onno Smit
a month ago

In [Configuration] tab click on the [Down] arrow to expand the [Profile].

Then select the Three Dots on the left and click the "Force package Reinstallation".

I
IK
a month ago

Thank you for your response. However, I need to do this with a script.

RS
Rafael Schäfer
a month ago

Afik there's no script for it but I assume you need to do it via script as multiple devices failed.

To try to fix them in one go, you can go to profiles (not on device details), search for the relevant profile , press three dots and choose "retry installation":

It will then retry the installation on all failed or partially installed devices.
BUT keep in mind, if the profile contains more than just the package, everything else will also be reinstalled (thats why i recommend to split them up).

The only alternatives i know are:

  • do it manually on every device (as shown by Onno Smit)
  • do it via api script (requires programming and api skills)
    • /devices/{deviceId}/profiles/{profileId}/packages/{packageId}/{version}/actions 
      • Method: Post
      • Payload: {"ActionKind":"ForceReinstall"}
A
ASBMOD@SOTI
27 days ago

Hi @IK,

Thanks for posting on SOTI Pulse, Thanks Rafael, and Onno for responding to the post, your expertise and willingness to help are greatly appreciated!

Have you had an opportunity to test the suggested solutions by  Rafael and Onno, and has it successfully addressed your query?

If not, or If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.

B
Börge
20 days ago (edited 20 days ago)

Maybe this is helpful, sometimes we are using following JavaScript snippet (all assigned packages are downloaded to this location):

mobicontrol.packages.install('/data/user/0/net.soti.mobicontrol.androidwork/app_pkg/InsertYourPackageNameHere.pcg');

Make sure the package is available at the location before sending the script command