Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3804940
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:35:54+00:00 2026-05-19T14:35:54+00:00

I have a NSIS script that works. It compiles, the produced installer works fine.

  • 0

I have a NSIS script that works. It compiles, the produced installer works fine. And yet, makensis.exe returns 1 instead of 0. This is a real pain because I use it in a continuous integration setup and now my CI thinks the build failed.

This just started when I switched my project from SVN to Git, and made one tiny change in the NSIS script (I changed a path in two places).

  • There are NO compile errors printed (even with /V4) that I can find.
  • There are 6 warnings but they are the same 6 it had in the old repo where makensis returned 0.
  • I diffed the previous, “errorlevel=0” output with the new “errorlevel=1” output and found no significant differences.
  • It produces an installer that works fine.
  • I’m still using the same exact copy of makensis.exe.

And yet, it returns errorlevel 1.

I am certain that I had this problem a couple years ago, but I can’t remember how I solved it. I think I just upgraded to the latest version of NSIS, but I can’t do that this time (I’m already using the latest).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:35:55+00:00Added an answer on May 19, 2026 at 2:35 pm

    Nevermind.

    The problem was in my batch file that executed makensis.exe. It had something like this:

    for %%A in (*.nsi) do (
        makensis.exe "%%A"
        if %errorlevel% neq 0
            echo %%A Failed.
        )
    )
    

    The problem is that %errorlevel% was being evaluated to a constant value at the beginning of the loop. In order to actually check the errorlevel within the loop, you have to use !errorlevel! not %errorlevel%. Also you have to have SETLOCAL ENABLEDELAYEDEXPANSION at the top of your batch file (I had that already).

    So evidently some prior unimportant step (possibly mkdiring a dir that already existed) was returning errorlevel 1 and then my check was thinking it was from the makensis call. Of course this begs the eternal question: “how did this ever work?”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Often my exe's have dll dependencies that I package with an installer like nsis
I have a nsis script to create an installer package of a tool in
I have a NSIS installer that we previously built using nAnt scripts that copy
I have a batch file that I need to run within my NSIS installer.
I have an NSIS installer that installs my Qt application. At the end of
I have written a Java app and an NSIS installer. Works great. The issue
I am using an NSIS script to create an installer for my Java program.
I have a NSIS script with a number of sections and a section group.
I have a simple NSIS script with a directory page, where the user can
I'm writing an NSIS installer for a project that requires the PyOpenGL package, however

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.