# How to get Ignition install directory (OS agnostic)?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [November 9, 2020, 6:19pm UTC](https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456 "2020-11-09T18:19:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 9, 2020, 6:19pm UTC](https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456/1 "2020-11-09T18:19:41Z")

</div>

As in the title, how can I get the Ignition install directory that is OS agnostic?

Also, are the relative paths from this point onwards the same regardless of OS?  
e.g. the Perspective projects directory, is this always:  
`<InstallDir>/data/projects`?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2020, 6:40pm UTC](https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456/2 "2020-11-09T18:40:32Z")

</div>

No, it’s not necessarily relative to the install directory.

If you have a `GatewayContext` object you can get the data directory by calling `getSystemManager().getDataDir()`.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 9, 2020, 6:57pm UTC](https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456/3 "2020-11-09T18:57:02Z")

</div>

Thanks!

```auto
from com.inductiveautomation.ignition.gateway import IgnitionGateway
context = IgnitionGateway.get()
projectParentFolder = str(context.systemManager.dataDir.absoluteFile).replace('\\','/') + '/projects/'

```

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [February 2, 2022, 9:20pm UTC](https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456/4 "2022-02-02T21:20:47Z")

</div>

Is this possible from the client scope in any way? I happen to need a version of this that would work from the script console.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 2, 2022, 9:25pm UTC](https://forum.inductiveautomation.com/t/how-to-get-ignition-install-directory-os-agnostic/40456/5 "2022-02-02T21:25:19Z")

</div>

Not unless you count sending a message to a message handler asking for the answer.
