Announcement

Collapse
No announcement yet.

Pass parameters to a certain exe with NSIS

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

  • Pass parameters to a certain exe with NSIS

    Hi, I would like to create a script to compile with NSIS that works via "open with".

    Suppose we have a .txt file, on the txt file I right-click, "open with" and select the executable compiled with NSIS. Subsequently the same executable will transfer the opening of the file to specific software.

    Is it possible to insert a string of code that does what I wrote inside an nsi script?

    Basically I was planning to create a Launcher to be able to make software portable without relying on third party software similar to PortableApps.com Launcher or WinPenPack's X-Launcher.

    Other features I managed to implement but unfortunately "open with" does not work.

  • #2
    What does "unfortunately "open with" does not work." mean?
    IntOp $PostCount $PostCount + 1

    Comment


    • #3
      I explain better

      EXAMPLE:

      1) I have an audio file in .aac format, I click on it with the right mouse button
      2) Using "Open with" I select the executable created with NSIS
      3) The executable created with NSIS will open the .aac file in a software present in the same folder as the compiled script.

      Obviously always if this is theoretically possible.

      Comment


      • #4
        Open with is not special in this case, the file is a command line parameter.
        IntOp $PostCount $PostCount + 1

        Comment


        • #5
          Thank you

          Thank you very much! I've been looking for a solution for at least a week.

          If I may ask, where do I find the string to enter as a command line?

          Comment


          • #6
            ${GetParameters} $0. Check you question on Stackoverflow for the full code.
            IntOp $PostCount $PostCount + 1

            Comment


            • #7
              Thank you

              Thank you very much

              Comment

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