Index: trunk/gsinstaller/gsManifest.cpp
===================================================================
--- trunk/gsinstaller/gsManifest.cpp	(revision 1878)
+++ trunk/gsinstaller/gsManifest.cpp	(revision 2013)
@@ -305,5 +305,9 @@
   if (actionName == "Manifest.CreateDir" || actionName == "CreateDir")
     {
-      RemoveDirectory(params[0].c_str());
+      if (!RemoveDirectory(params[0].c_str()))
+	  {
+    	MessageBox(0, "Remove failed", params[0].c_str(), MB_OK);
+			this->removeFailed.add(params[0]);
+	  }
       return true;
     }
@@ -314,4 +318,9 @@
     }
   return false;
+}
+
+bool gsManifest::undoFailed(string path)
+{
+	return this->removeFailed.includes(path);
 }
 
Index: trunk/gsinstaller/gsManifest.h
===================================================================
--- trunk/gsinstaller/gsManifest.h	(revision 1878)
+++ trunk/gsinstaller/gsManifest.h	(revision 2013)
@@ -26,4 +26,5 @@
   strArrayMap manifests;
   pathStringArrayMap selected;
+  stringArray removeFailed;
 
   bool getManifestLine(char *line, string &macro);
@@ -36,4 +37,5 @@
   void logAction(string actionName, string source, string dest);
   bool undoAction(string actionName, stringArray &params);
+  bool undoFailed(string path);
   void expandGroupInstance(const string &parentgroup, string groupName);
   void expandGroup(const string &group);
Index: trunk/gsinstaller/gsinstall.cpp
===================================================================
--- trunk/gsinstaller/gsinstall.cpp	(revision 1878)
+++ trunk/gsinstaller/gsinstall.cpp	(revision 2013)
@@ -72,4 +72,5 @@
   FilePath *collectionPath();
   FilePath *installPath();
+  FilePath *installSourcePath() { return this->sourcePath; }
   bool copyFiles();
   bool updateRegistry();
@@ -78,4 +79,5 @@
   bool updateSetupExe();
   bool installNetscape();
+  bool removeFailed(string file) { return this->manifest->undoFailed(file); }
   void setDestination();
   bool setUninstall();
@@ -387,5 +389,5 @@
       FilePath exeDest(tempPath, "gssetup.exe");
       FilePath logDest(tempPath, "install.log");
-      
+
       CopyFile(exePath.cString(), exeDest.cString(), false);
       CopyFile(logPath.cString(), logDest.cString(), false);
@@ -436,4 +438,5 @@
 	}
     }
+  
 }
 
@@ -510,5 +513,7 @@
 
 
-	if (this->platform.isWindows32s() == false) // NB: don't add this shortcut under
+	FilePath uninstallPath(this->destinationPath->pathString(), "gssetup.exe");
+    FilePath logPath(this->destinationPath->pathString(), "install.log");
+    if (this->platform.isWindows32s() == false) // NB: don't add this shortcut under
                                               // Windows32s as it causes a crash
                                               // 
@@ -516,10 +521,11 @@
                                               // happy code
   {
-      FilePath uninstallPath(this->destinationPath->pathString(), "gssetup.exe");
-      FilePath logPath(this->destinationPath->pathString(), "install.log");
       if (!this->progman->addIcon(groupName, "Uninstall", uninstallPath.pathString(), " -u " + logPath.pathString(),
 				  "Remove this Greenstone collection"))
       {
       }
+	}
+	else
+	{	MessageBox(0, uninstallPath.cString(), logPath.cString(), MB_OK);
 	}
       // disconnect from program manager
@@ -749,5 +755,5 @@
 
         case dirpath_OPTION:
-	  ((dirSelector *) GetWindowLong(Dialog, GWL_USERDATA))->setOption(IsDlgButtonChecked(Dialog, dirpath_OPTION));
+	  ((dirSelector *) GetWindowLong(Dialog, GWL_USERDATA))->setOption(IsDlgButtonChecked(Dialog, dirpath_OPTION) == BST_CHECKED);
 	  if (HIWORD(wParam) == BN_CLICKED && false)
 	    // don't do the enable/disable these days
@@ -958,5 +964,5 @@
 	    string logPathString(at);
 	    FilePath logPath(logPathString);
-	    
+
 	    GSInstall install(true);
 	    // if we're running in the temporary directory, do the uninstall
@@ -980,11 +986,18 @@
 		  FilePath *logParent = logPath.parent();
 		  FilePath uninstallPath(*logParent, "gssetup.exe");
-		  
+
 		  // delete the gssetup executable
 		  DeleteFile(uninstallPath.cString());
-		  
+
+      	MessageBox(0, logParent->cString(), "Removing", MB_OK);
+		  if (install.removeFailed(logParent->pathString()))
+			{
+				RemoveDirectory(logParent->cString());
+			}
+
 		  // dispose of the parent directory information
 		  delete logParent;
 		}
+
 	      // if not, then overwrite the original log with the modified one
 	      else
@@ -1011,5 +1024,5 @@
 		install.copyFiles();       // caused page fault; Windows 3.1
 		install.updateProgman();   // caused divide overflow; Windows 3.1
-    install.updateRegistry();
+		install.updateRegistry();
 		install.updateProfiles();
 		install.updateSetupExe();  // caused bomb-out of Windows; 3.1
Index: trunk/gsinstaller/unInstall.cpp
===================================================================
--- trunk/gsinstaller/unInstall.cpp	(revision 1878)
+++ trunk/gsinstaller/unInstall.cpp	(revision 2013)
@@ -245,5 +245,5 @@
 	if (!this->logfile.rdbuf()->is_open())
 #endif
-	{	MessageBox(0, "Unable to open log file", "Test", MB_OK);
+	{	MessageBox(0, "Unable to open log file", this->logfileName.c_str(), MB_OK);
 	}
 
