# Add directories to PATH env when launching SlicerCAT

**URL:** <https://discourse.slicer.org/t/add-directories-to-path-env-when-launching-slicercat/16849>\
**Category:** Support\
**Created:** [March 30, 2021, 1:50pm UTC](https://discourse.slicer.org/t/add-directories-to-path-env-when-launching-slicercat/16849 "2021-03-30T13:50:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [March 30, 2021, 1:50pm UTC](https://discourse.slicer.org/t/add-directories-to-path-env-when-launching-slicercat/16849/1 "2021-03-30T13:50:58Z")

</div>

Hi,

My custom app have .dll dependency. To launch app I need to set PATH env to these .dll (on windows).  
Where can I see how this is done in slicer?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 14, 2021, 5:48am UTC](https://discourse.slicer.org/t/add-directories-to-path-env-when-launching-slicercat/16849/2 "2021-04-14T05:48:09Z")

</div>

You would normally build (or at least install) these DLLs as part of the custom application package. If you don’t do that then you can simply copy the DLLs into the bin folder of Slicer, or add the external path to the `Paths` section of your `Slicer-NNNN.ini` file.

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [April 14, 2021, 12:12pm UTC](https://discourse.slicer.org/t/add-directories-to-path-env-when-launching-slicercat/16849/3 "2021-04-14T12:12:33Z")

</div>

Thank you,

I think I’ve found how this is done in Slicer. By adding lines in external project :

```auto
# library paths
set(${proj}_LIBRARY_PATHS_LAUNCHER_INSTALLED 
  ${GDAL_ROOT}
  ${GDAL_ROOT}/data/proj # path that needs to be added to PATH env
  )
mark_as_superbuild(
  VARS ${proj}_LIBRARY_PATHS_LAUNCHER_INSTALLED
  LABELS "LIBRARY_PATHS_LAUNCHER_INSTALLED"
  )

```

path is automatically added to `Slicer-NNNN.ini` file. In this example I used it in `INSTALL` mode, but it also can be used in `BUILD` mode in similar way (examples can be found in slicer’s external package like python or VTK).
