# Silent installation of NSIS installer from CPACK with modifying PATH

**URL:** https://discourse.cmake.org/t/silent-installation-of-nsis-installer-from-cpack-with-modifying-path/13720
**Category:** Code
**Created:** [March 11, 2025, 1:45pm UTC](https://discourse.cmake.org/t/silent-installation-of-nsis-installer-from-cpack-with-modifying-path/13720 "2025-03-11T13:45:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![t-b](https://discourse.cmake.org/user_avatar/discourse.cmake.org/t-b/32/4957_2.png) [@t-b](https://discourse.cmake.org/u/t-b)
#### Post date: [March 11, 2025, 1:45pm UTC](https://discourse.cmake.org/t/silent-installation-of-nsis-installer-from-cpack-with-modifying-path/13720/1 "2025-03-11T13:45:04Z")

</div>

I’ve created an NSIS installer via cmake/cpack for a command line application on Windows. It has the setting `set(CPACK_NSIS_MODIFY_PATH ON)` so it allows the interactive user to add the installation location to the PATH variable.

Now I would like to use that installer for a winget package. But winget runs the installer silently, and I have not found a way to modify the PATH variable with the silent installer.

I’ve seen [CMake Silent Install with Options Help - #4 by Francesco\_Pretto](https://discourse.cmake.org/t/cmake-silent-install-with-options-help/1475/4) but that is about an MSI package.

Any ideas?
