Announcement

Collapse
No announcement yet.

Set Path in environment Variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set Path in environment Variables

    Hi folks,

    New to NSIS. I have been able to ceate an installer that copies a bunch of files into a detination forlder and creates the uninstaller. The usual stuff.

    But what I need to do is to append a path name to the PATH environment and I'm have no joy. Can anyone help me here?

    Many thanks.

    Cran0g

  • #2


    Path is a limited shared resource, avoid bloating it if at all possible.
    IntOp $PostCount $PostCount + 1

    Comment


    • #3
      Adding to the Path

      Hi, Thanks for the reply. I had actually added this plugin to my NSIS installation and run the sample program. All works just fine, so I know that the installation is good. However, I cannot see, from the examples in that file how to append a new path to the existing environment variable "Path".

      It must be possible, because a key feature of installers is to set the path to the newly installed path and then advise the user to reboot.

      How is this done in NSIS. Is it even possible?

      Comment


      • #4
        EnVar::AddValue "PATH" "$InstDir\foo\bar"
        Pop $0
        IntOp $PostCount $PostCount + 1

        Comment


        • #5
          Adding to the Path

          Hi Anders,

          That did it. Many thanks!

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎