Trigger StageNow with MobiControl JavaScript

ML
Matt Ladwig
AbeTech Inc

I am looking for a way to trigger StageNow on a Zebra MC9300 to consume an XML.  I would like to do this with JavaScript because I need to edit the XML with device data before I consume the file.

The only way I currently know how to trigger the device to consume the XML file is with a legacy script but really don't want to have to run 2 different scripts to edit and consume the file.

Thanks in advance.

3 years ago
Android Scripting
ANSWERS
MD
Matt Dermody Diamond Contributor
3 years ago

I'm not sure about running mxconfig (or equivalent) through javascript. Could you use a javascript based script to edit and save the XML and a separate legacy script to run the xml with mxconfig?

S
SAMOD@SOTI
2 years ago

Hello Matt,

Thank you for posting on SOTI Central,

This may help you with your inquiry regarding StageNow from Zebra Technologies.


Custom JavaScript Guide (From Zebra)

Customize Enterprise Browser (From Zebra)

Both of those links use Zebra Enterprise Browser, not StageNow, which can be used to create XML-based profiles for configuring the settings of Zebra devices. 

I also checked ZebraOEM config app, and could not find anything related to JavaScript, but you can leverage the use of Zebra OEM app to configure some XML config.








Thank you.

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

M
MiKe
2 years ago

I think the request is about MobiControl  Javascript and has nothing to do with Zebra  Javascript.

As in MobiControl Legacy script there exist "mxconfig" command and we want Mobicontrol JavaScript alternative to it (or at least option how to launch legacy script from Mobicontrol JavaScript)

S
SAMOD@SOTI
2 years ago

Hello MiKe,

Thank you for posting on SOTI Central,

Regarding your question, that is already the object of some Feature Requests, that may be potentially implemented on a future release, but we do no have a specific date or confirmation yet.

The purpose would be to be able to use MXConfig APIs along with JavaScript engine function to further control/configure your Zebra devices.

You may also leverage the use of APIs:

Android Plus JavaScript Scripts (From SOTI Help)



Thank you,

Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

S
SAMOD@SOTI
2 years ago

Hello MiKe,

Thank you for your post.

I posted a response on the post.

Thank you.

M
MiKe
2 years ago

I found workaround: There is JavaScript for package install. So I've created package with preinstall script that launches Mx xml (xml does not need to be in the package) and it works like a charm.

AP
Armando Pino
2 years ago

Nice workaround! I found this out not too long ago. The only thing I'd like to mention is that it does require pushing the pcg file to the device prior to running the JavaScript.

You can accomplish this by building the preinstall legacy script pcg file beforehand and then add the pcg file to the device using a "new" pcg (package inception). Then I added a post-install JavaScript with the mobicontrol package install and pointed it to the pcg file I deployed earlier. Voilà, you're able to trigger a "legacy script" from a JavaScript.

Of course, you can add if/else statements and other syntax to make the process unique to whatever you are trying to accomplish.

//post-install script

#!/usr/bin/env js

mobicontrol.packages.install('/sdcard/YourLegacyScript.pcg', mobicontrol.app.start);