SCRIPT FOR LOCKDOWN

G
GMFOOD
GM Food Ibérica (Miquel Alimentacion)

Hola/Hi.

SOTI MOBICONTROL - Lockdown

      I would like to know if, I can have only one profile created for one device (for example: Zebra TC20), where a path to an application is different on Android 9.0 and Android 10.0.
 
      My intention is that, using a variable in a script, from Launch: // ... you can launch one application or another.

_____
Example: (script in batch language)

IF %ossvers% GTR 10 Set x_apk=com.android.documentsui
IF %ossvers% LSS 10 Set x_apk=com.google.android.documentsui

And on the Launcher line ...

Launch://%x_apk%
_____

Is that possible?

If not, what other alternative exists without creating a second profile?


Thanks.


■/■

Hola/Hi.

SOTI MOBICONTROL - Lockdown

 Querría saber si puedo tener creado solo un perfil para un dispositivo (por ejemplo: Zebra TC20), en el que una ruta a una aplicación, es diferente en os Android 9.0 y Android 10.0.
 
  Mi intención es que, usando una variable en un script, desde Launch://... pueda lanzar una aplicación u otra.

_____
Ejemplo: (script en lenguaje batch)

IF %ossvers% GTR 10 Set x_apk=com.android.documentsui
IF %ossvers% LSS 10 Set x_apk=com.google.android.documentsui

Y en la linea del Launcher…


Launch://%x_apk%
_____

Es eso posible?

Si no es así, que otra alternativa existe sin crear un segundo perfil?

Gracias.

4 years ago
Android Scripting
ANSWERS
J
JCMOD@SOTI
4 years ago

Hi GMFood,

Thank you for posting in SOTI Central.

You can use filters on your profiles in order to achieve your desired goal. Once you press Save and Assign, then navigate to the Filters section. Also, feel free to use this as a reference:

This will then utilize the filter with your device group and only assign it to devices that match.

If this resolves the issue, please mark this post as the solution. Also, feel free to reach out if you need any clarification or have any questions.

Regards,

RC
Raymond Chan Diamond Contributor
4 years ago

Depending on the MobiControl server version, the apps to be launched/re-launched, and one's Mobicontrol knowledg/skill level, it is in principle possible to use script/rule and relevant html template to support starting different app for the same kiosk item configured with one single profile.  However, the solution is unlikely to be using "launch" kiosk item,  or the macros and the IF script construct you mentioned in your post. 

In fact,  if you only have two groups of devices to handle, the approach mentioned by JCMOD@SOTI is likely to be a simpler alternative that can be easily handled by even novice administrators,  though two profiles need to be created.

MD
Matt Dermody Diamond Contributor
4 years ago

Agreed with just cloning your Lockdown profile and splitting it between the different device types using Filter Criteria. It would be significantly more complicated to try to reproduce the same end result with scripting and conditionals than just using the built in criteria mechanisms of the Profiles themselves. 

G
GMFOOD
4 years ago

Hi!

The example just illustrated the intention to apply some kind of condition to the .html template.

I don't know how to really apply a filter to a SOTI template.

I know the allocation filters. But this solution does not allow me to have only one profile. I have to have two profiles to apply the corresponding filters.

Thanks for answering.

■ ___

Hola!

El ejemplo tan solo ilustraba la intención de aplicar algún tipo de condición en la plantilla .html.

Desconozco como aplicar, realmente, un filtro en una plantilla de SOTI.

Conozco los filtros de asignación. Pero esta solución no me permite tener un solo perfil. Tengo que disponer de dos perfiles para aplicar los filtros correspondientes.

Gracias por contestar.

G
GMFOOD
4 years ago

Hello,

I know the allocation filters. But that solution does not allow me to have only one profile. I have to have two profiles and create the corresponding filters for the profile to be installed or not.

You would not want to have two profiles for the same device, just because you have a different version of Android.


Thanks for the reply


■----------

Hola,

Conozco los filtros de asignación. Pero esa solución no me permite tener un solo perfil. Tengo que disponer de dos perfiles y crear los filtros correspondientes para que se instale el perfil o no.

No querría tener dos perfiles para un mismo dispositivo, por el solo hecho de tener una versión de Android diferente.


Gracias por la respuesta

G
GMFOOD
4 years ago

Thanks.

In this specific case, I will make 2 profiles and each of them will be assigned to the different devices based on the filters you configure.

It is a solution that I already had, but it is not the one I would want! ; (

Thanks

■----------

Gracias.

En este caso concreto, haré 2 perfiles y cada uno de ellos se asignará a los diferentes dispositivos en base a los filtros que configure.

Es una solución que ya tenía, pero no es la que yo querría! ;(

Gracias 

MD
Matt Dermody Diamond Contributor
4 years ago

Our argument is that is is simpler to have two Profiles and use the native Filter Criteria functionality built into the Profile architecture to accomplish the separation that you are looking for rather than trying to reproduce the equivalent result in a nonstandard way through conditional logic in the lockdown itself. I understand what you are trying to accomplish but I don't believe that it is worth the effort nor does it provide that much benefit given your scenario.

If all we're talking about is 2 lockdown profiles that result then that's not particularly difficult to maintain, especially since you can use the Clone feature to duplicate the existing lockdown rather than rebuilding it completely from scratch. If this design decision instead resulted in you having 10x or more Lockdown Profiles and you had the opportunity to reduce complexity by adding conditional logic to the lockdown then I would understand the desire to make that more consolidated and elegant. It doesn't matter so much if it is just two Lockdowns. I've spent more time writing this response than it would take to clone a lockdown profile, modify the one bundle ID value, and then adjust the Filter Criteria to be model specific.