           setupExe: manifest.name + '-' + manifest.version + '-win32-setup-for-nsis.exe'
           noMsi: true
           arch: 'ia32'
-        .then callback, callback
+        .then ->
+          console.log 'winInstaller done'
+          callback()
+        .catch err ->
+          console.log 'winInstaller errored'
+          callback err
 
     # Run makensis
     applySpawn (process.env.MAKENSIS_PATH or 'makensis.exe'), ['build/resources/win/installer.nsi']

        .replace /%CHANNEL%/g, 'dev'
      releasesUrl = remoteReleasesUrl + '/RELEASES'

      request {url: releasesUrl}, (err, res, body) ->
        if err or not res or res.statusCode < 200 or res.statusCode >= 400
          console.log 'Creating installer without remote releases url', releasesUrl, 'because of',
            'error', err, 'statusCode', res and res.statusCode, 'body', res and res.body
          remoteReleasesUrl = undefined

        winInstaller
          appDirectory: './build/win32'
          outputDirectory: './dist'


    # Create the installer
    (callback) ->
      console.log 'creating installer'
      signParams = [
        '/t'
        'http://timestamp.verisign.com/scripts/timstamp.dll'
