     ChildProcess.execFile options.cmd, options.args, (error, stdout, stderr) ->
       grunt.log.error(stderr) if stderr
       callback(error)
-      
+
   locateExecutableInPath = (name) ->
     haystack = _.map process.env.PATH.split(/[:;]/), (x) -> path.join(x, name)
     _.find haystack, (needle) -> fs.existsSync(needle)
 
   grunt.registerMultiTask 'create-windows-installer', 'Create the Windows installer', ->
     @requiresConfig("#{@name}.#{@target}.appDirectory")
-    
+
     useMono = false
     [monoExe, wineExe] = _.map(['mono', 'wine'], locateExecutableInPath)
-    
+
     unless process.platform is 'win32'
       useMono = true
       throw new Error("You must install both Mono and Wine on non-Windows") unless wineExe and monoExe

      if remoteReleases?
        cmd = path.resolve(__dirname, '..', 'vendor', 'SyncReleases.exe')
        args = ['-u', remoteReleases, '-r', outputDirectory]
        
        if useMono
          args.unshift(cmd)
          cmd = monoExe

            setupPath = path.join(outputDirectory, "#{metadata.productName}Setup.exe")
            setupMsiPath = path.join(outputDirectory, "#{metadata.productName}Setup.msi")
            fs.renameSync(path.join(outputDirectory, 'Setup.exe'), setupPath)

            if fs.existsSync(path.join(outputDirectory, 'Setup.msi'))
              fs.renameSync(path.join(outputDirectory, 'Setup.msi'), setupMsiPath)

          done()

