# Add command line options to my installer (CPack + NSIS)

**URL:** https://discourse.cmake.org/t/add-command-line-options-to-my-installer-cpack-nsis/6882
**Category:** Code
**Tags:** cpack:nsis
**Created:** [November 16, 2022, 4:11pm UTC](https://discourse.cmake.org/t/add-command-line-options-to-my-installer-cpack-nsis/6882 "2022-11-16T16:11:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Lotte1990](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lotte1990/32/529_2.png) [@Lotte1990](https://discourse.cmake.org/u/Lotte1990)
#### Post date: [November 16, 2022, 4:11pm UTC](https://discourse.cmake.org/t/add-command-line-options-to-my-installer-cpack-nsis/6882/1 "2022-11-16T16:11:38Z")

</div>

Hello,

I would like to add some command line options to my installer that I create using CPack and NSIS.  
Example: instead of running “myinstaller.exe”, I would like to run “myinstaller.exe --noshortcut” which then omits the creation of a desktop shortcut. Possibly also add some other options. How should I proceed? All suggestions are welcome.

Thanks!

---

<div class="post-metadata">

### Author: ![hsattler](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/59ef9b/32.png) [@hsattler](https://discourse.cmake.org/u/hsattler)
#### Post date: [November 16, 2022, 6:10pm UTC](https://discourse.cmake.org/t/add-command-line-options-to-my-installer-cpack-nsis/6882/2 "2022-11-16T18:10:04Z")

</div>

CPack uses teo template files for the NSIS setup. You can just copy that to a directory that you set in CMAKE\_MODULE\_PATH. I think this is mentioned in the documentation or in the wiki.

---

<div class="post-metadata">

### Author: ![Lotte1990](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lotte1990/32/529_2.png) [@Lotte1990](https://discourse.cmake.org/u/Lotte1990)
#### Post date: [November 17, 2022, 8:12am UTC](https://discourse.cmake.org/t/add-command-line-options-to-my-installer-cpack-nsis/6882/3 "2022-11-17T08:12:35Z")

</div>

Where exactly in the documentation or the wiki is this mentioned? I was unable to find it. A google search for “teo template files” or “teo template files cpack” did also not give me any information. I really don’t know where to find this info.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 17, 2022, 2:28pm UTC](https://discourse.cmake.org/t/add-command-line-options-to-my-installer-cpack-nsis/6882/4 "2022-11-17T14:28:03Z")

</div>

I think “teo” is a typo of some kind. Or it’s the name for the NSIS “language”. CMake has its template files [here](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/Internal/CPack/NSIS.template.in). I don’t know of a way to replace its usage off-hand though.
