Install package with legacy script from a JavaScript script package

XS
Ximo Serra
damal0002
2 years ago
Android Scripting
ANSWERS
ZC
Zafer Cigdem
2 years ago

Hi Ximo,

As you already mentioned the previous post (SOTI Discussion Forum), when I tested it out, i did face the same issue. And as I adviced there as an alternative option:

You may try to create a custom data as .ini file or such from your pre/post script, and based on the custom data you can create a Virtual Filter group from MobiControl Webconsole, and you can list related devices under this Virtual Group to send over this JS by using a FileSync rule from Server-to-device direction, I earlier tested this out and it worked. I hope it helps

Zafer

RS
Rafael Schäfer
2 years ago

I'm still not sure if i understood correctly what you did in which order but:

1. Using packages you can create dependencies, so that a package is depending on another to be installed. With that you can create a chain of dependencies if needed.

2. Don't use javascript and legacy script in same script file, you need to seperate them.

RC
Raymond Chan
2 years ago

The sets of Android script commands that are supported in different initiation use-cases (e.g. web-console send script, scheduled task profile payload, file-sync rules/policies, .pcg packages,  OOC/speed-kosk, remote-control command shell, etc.) vary slightly differently, and may also be dependent on the device agent version, enrollment mode/MDM-API, etc.

Also, based on my actual tests and production usage,  mixing legacy MobiControl scripts and javascript  are SOMETIMES possible,  I haven't figured out any well-defined patterns or rules, and extensive tests have to be tried on targeted device model(s) & device agent version(s) for each advanced script usage case.

ZC
Zafer Cigdem
2 years ago

Hi @Raymond,

That would be great know how to combine both JS and legacy scripts from script side (not using a Web Console such as custom data or such as threshold/trigger mechanism). If you can share any example or idea that would help a lot. Thank you

Zafer

P
PMMOD@SOTI
2 years ago