# Get my app version in c/c++ code

**URL:** <https://forum.legato.io/t/get-my-app-version-in-c-c-code/5117>\
**Category:** Legato Application Framework\
**Created:** [March 30, 2020, 12:49pm UTC](https://forum.legato.io/t/get-my-app-version-in-c-c-code/5117 "2020-03-30T12:49:35Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Sasha](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Sasha](https://forum.legato.io/u/Sasha)\
**Post date:** [March 31, 2020, 5:17pm UTC](https://forum.legato.io/t/get-my-app-version-in-c-c-code/5117/10 "2020-03-31T17:17:19Z")

</div>

Actually, there are 2 slightly different cases:

- Sandboxed application
- Non-sandboxed application

If your application is non-sandboxed, then your original procedure should work, afaik.  
In case of sandboxed application, for each application there is its own config tree and you should grant your application access to to those trees. `version` information is located in `system` tree, so you should grant access to the `system` tree.

```auto
requires:
{
	configTree:
	{
		[w] . // I need write access to my configuration data.
		[r] system // I need read access to system configuration data.
	}
}

```

But that’s not all. If you’re accessing another tree, you should specify the name of this tree in `path` argument. So, it should look something like:

```auto
char version[256] = "unknown";
le_cfg_QuickGetString("system:/apps/helloWorld/version", version, sizeof(version), version);

```

---

_[View the full topic](https://forum.legato.io/t/get-my-app-version-in-c-c-code/5117)._
