LogicMachine Forum
get version of installed app - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: get version of installed app (/showthread.php?tid=6360)



get version of installed app - Fcs - 21.03.2026

Hello everyone,

I’m trying to find out how to determine the version of an installed application, basically the information that appears in the control file.

I don’t know whether it’s stored in a database or in a file somewhere.

Thanks for the help.


RE: get version of installed app - admin - 23.03.2026

Use this, replace app-name with the real application name:
Code:
control = io.readfile('/data/apps/usr/lib/opkg/info/app-name.control') or ''
version = control:match('Version: (%d+)') or ''
version = tonumber(version) or 0
log(version)



RE: get version of installed app - Fcs - 23.03.2026

thanks you admin, perfect