--- a/msvc/Makefile.msvc6
+++ b/msvc/Makefile.msvc6
@@ -16,6 +16,8 @@
 SOFTWARE_TYPE     = NT
 SOFTWARE_VERSION  = 5.0
 THEHOST           = win32
+
+TAR_DIR = %%CD%%\ecl-$(ECL_VERSION)
 
 # Programs used by "make":
 #
@@ -31,6 +33,7 @@
 CP      = copy /Y
 MV      = move /Y
 MSDEV   = msdev
+MKNSI   = makensis.exe
 
 # ==================== Where To Install Things ====================
 
@@ -102,9 +105,9 @@
 	    -e "s,@true_srcdir@,$(srcdir:\=/),g" \
 	    -e "s,@true_builddir@,$(MAKEDIR:\=/),g" \
 	    -e "s,@CFLAGS@,$(CFLAGS),g" \
-	    -e "s,@ECL_CFLAGS@,-I$(libdir:\=/)/h,g" \
+	    -e "s,@ECL_CFLAGS@,,g" \
 	    -e "s,@LDRPATH@,,g" \
-	    -e "s,@LDFLAGS@,/link /LIBPATH:$(libdir:\=/),g" \
+	    -e "s,@LDFLAGS@,/link /LIBPATH:~S,g" \
 	    -e "s,@SHARED_LDFLAGS@,/LD,g" \
 	    -e "s,@BUNDLE_LDFLAGS@,/LD,g" \
 	    -e "s,@CLIBS@,user32.lib ws2_32.lib,g" \
@@ -131,9 +134,9 @@
 cmp/cmpcfg.lsp: $(srcdir)/cmp/cmpcfg.lsp.in Makefile.msvc6
 	sed -e "s,@ECL_CC@,$(CC),g" \
 	    -e "s,@CFLAGS@,$(CFLAGS),g" \
-	    -e "s,@ECL_CFLAGS@,-I$(libdir:\=/)/h,g" \
+	    -e "s,@ECL_CFLAGS@,,g" \
 	    -e "s,@LDRPATH@,,g" \
-	    -e "s,@LDFLAGS@,/link /LIBPATH:$(libdir:\=/),g" \
+	    -e "s,@LDFLAGS@,/link /LIBPATH:~S,g" \
 	    -e "s,@SHARED_LDFLAGS@,/LD,g" \
 	    -e "s,@BUNDLE_LDFLAGS@,/LD,g" \
 	    -e "s,@CLIBS@,user32.lib ws2_32.lib,g" \
@@ -187,15 +190,27 @@
 	$(MAKE) -f Makefile.msvc6 install "prefix=$(prefix)"
 install-base:
 	IF NOT EXIST $(bindir) $(MKDIR) $(bindir)
-	IF NOT EXIST $(libdir) $(MKDIR) $(libdir)\h
+	IF NOT EXIST $(libdir)\h $(MKDIR) $(libdir)\h
 	for %i in ($(TARGETS) ecl.dll) do $(CP) %i $(bindir)\%i
 	$(CP) ecl-config.bat $(bindir)\ecl-config.bat
 	for %i in ($(LSP_LIBRARIES) $(LIBRARIES) c\dpp.exe help.doc ecl.lib) do $(CP) %i $(libdir)
 	$(CP) h\config.h $(libdir)\h
-flatinstall: BUILD-STAMP
-	$(MAKE) bindir=$(prefix) libdir=$(prefix) install-base
-	cd c; $(MAKE) prefix=$(prefix) flatinstall
-	cd doc; $(MAKE) prefix=$(prefix) flatinstall
+flatinstall:
+	$(MAKE) -f Makefile.msvc6 bindir=$(prefix) libdir=$(prefix) install-base
+	cd c
+	$(MAKE) -f Makefile.msvc6 prefix=$(prefix) flatinstall
+	cd ..\doc
+	$(MAKE) -f Makefile.msvc6 prefix=$(prefix) flatinstall
+	cd ..
+
+windows-nsi:
+	IF EXIST $(TAR_DIR) $(RMDIR) $(TAR_DIR)
+	$(MKDIR) $(TAR_DIR)
+	$(MAKE) -f Makefile.msvc6 flatinstall prefix=$(TAR_DIR)
+	util\ecl_nsi.bat %%CD%%\$(srcdir)\util\ecl.nsi $(TAR_DIR)
+	$(MKNSI) $(TAR_DIR)/ecl.nsi
+	$(MV) $(TAR_DIR)\Setup.exe ecl-$(ECL_VERSION).exe
+	$(RMDIR) $(TAR_DIR)
 
 uninstall:
 	for i in $(TARGETS) ecl-config; do rm -rf $(bindir)/$$i; done
@@ -228,10 +243,6 @@
 	cd c
 	-$(MAKE) -f Makefile.msvc6 clean
 	cd ..
-#	for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done
-#	$(RM) ecl_min$(EXE) ecl$(EXE) help.doc core a.out
-#	$(RM) config.version config.log config.cache
-#	$(RM) *.c *.o *.a *.h *.data
 clean_lisp:
 	-for %i in (lsp cmp clos clx tk) do for %k in (%i.lib %i.fas %i.ilk %i.c %i.obj %i.pdb) do $(RM) %k
 	-for %i in (lsp cmp clos clx tk) do $(RMDIR) %i