Author Topic: Add force switch to installation file  (Read 3072 times)

Offline olivier sc

  • Single posting newcomer
  • *
  • Posts: 5
Add force switch to installation file
« on: November 27, 2024, 06:21:21 pm »
Hello Dear All,

As you know, we use more and more silent installations for deployments and updates.
Would it be possible to add a /force option to prevent the setup from complaining because there are already files in the destination folder?
We have "non-zero exit status" in 2 or sometimes 4.
And nothing more is done.
It would be good to be able to upgrade versions without necessarily worrying about this detail.

Thanking you in advance.

Online Михаил Агарков

  • Multiple posting newcomer
  • *
  • Posts: 22
  • Highly sensitive programmer. ☮☯
    • Website
Re: Add force switch to installation file
« Reply #1 on: November 27, 2024, 06:58:59 pm »
After looking it up, NSIS exit code 2 means "Installation aborted by script", and exit code 4 is a custom one.

Offline olivier sc

  • Single posting newcomer
  • *
  • Posts: 5
Re: Add force switch to installation file
« Reply #2 on: December 03, 2024, 06:26:30 pm »
Yes we have CalledProcessErrorOutput: Command '"codeblocks-20.03mingw-setup.exe" /S' returned non-zero exit status 2.
Just because old "codeblocks" is in place.

So add a /force option make sens to complet the update by overwriting.

Offline olivier sc

  • Single posting newcomer
  • *
  • Posts: 5
Re: Add force switch to installation file
« Reply #3 on: December 03, 2024, 06:27:24 pm »
Or maybe add a real update process by a /update ?