Search code examples
nsiswinget

winget process and command line switches for NSIS upgrade


I have an NSIS installer and created a yaml manifest, and I need to handle upgrades.

When an upgrade is performed by winget, does it first run uninstall on the existing install, then the new downloaded installer?

If there is a specification on the switches to the different installer types (MSIX, INNO, NSIS, EXE etc) it would be very useful i cant seem to find the low level interface (on how winget calls the installers and switches) in the docs.


Solution

  • Winget knows about the two standard NSIS switches /S and /D=c:\install\path if you specify nullsoft as the type in your manifest. I believe it also supports /AllUsers and /CurrentUser.

    I don't think Winget will uninstall first. You can do that yourself in your installer on upgrades if you really need to.

    Your Winget manifest can specify custom switches if you want to do something special in your installer when called from Winget.