Index: main/trunk/greenstone2/runtime-src/src/w32server/fnord.cpp
===================================================================
--- main/trunk/greenstone2/runtime-src/src/w32server/fnord.cpp	(revision 24412)
+++ main/trunk/greenstone2/runtime-src/src/w32server/fnord.cpp	(revision 24498)
@@ -875,14 +875,18 @@
 // --location=directory (the path to GSDLHOME which defaults to the
 // directory where server.exe lives)
+// --mode=gli (when server.exe is run from GLI). If GLI, "gli." is 
+// the prefix used to load autoenter and start_browser properties
+// (gli.autoenter, gli.start_browser) from the config file
 // --config=file (the path to the configuration file to use which defaults
 // to GSDLHOME\llssite.cfg)
 // --cmd=init  Used to initialize the llssite.cfg file only - jmt12 18/11/2003
-static void parse_args(const text_t cmdline, text_t &location, text_t &config_file, text_t &command) {
+static void parse_args(const text_t cmdline, text_t &location, text_t &mode, text_t &config_file, text_t &command) {
 
   location.clear();
   config_file.clear();
+  mode.clear();
   command.clear(); // jmt12 18/11/2003
 
-  if (cmdline.size() < 3) return;
+  if (cmdline.size() < 4) return;
 
   text_t name, val;
@@ -895,4 +899,6 @@
       if (name == "location") {
 	location = val;
+      } else if(name == "mode") {
+	mode = val;
       } else if (name == "config") {
 	config_file = val;
@@ -916,4 +922,6 @@
   if (name == "location") {
     location = val;
+  } else if (name == "mode") {
+    mode = val;
   } else if (name == "config") {
     config_file = val;
@@ -953,7 +961,15 @@
 
   // parse arguments
-  text_t location, config_file, command;
-  parse_args(CmdLineStr, location, config_file, command);
+  text_t location, mode, config_file, command;
+  parse_args(CmdLineStr, location, mode, config_file, command);
   gsdl_conffile = config_file;
+  if (mode.empty()) {
+	// if the server is run on its own, mode_prefix is "" with no '.' suffix
+	gsdl_mode_property_prefix = "";
+  } else {
+	// if the server is launched from GLI, the mode_prefix is "gli" and needs
+	// '.' suffixed when accessing certain properties from the config file.		
+	gsdl_mode_property_prefix = mode + ".";
+  }
  
   // Try to generate the llssite.cfg file if it's missing
Index: main/trunk/greenstone2/runtime-src/src/w32server/settings.cpp
===================================================================
--- main/trunk/greenstone2/runtime-src/src/w32server/settings.cpp	(revision 24412)
+++ main/trunk/greenstone2/runtime-src/src/w32server/settings.cpp	(revision 24498)
@@ -69,6 +69,7 @@
 int gsdl_start_browser = 1;
 int gsdl_address_resolution_method = 2;  // use localhost since users may switch between computers
+				// The resolution method was previously on 1: Get an IP, but don't resolve to a name
 text_t gsdl_host_IP;
-// The resolution method was previously on 1: Get an IP, but don't resolve to a name
+text_t gsdl_mode_property_prefix;
 
 // private data
@@ -313,9 +314,9 @@
     write_ini_line(fout, "portnumber", text_t(gsdl_port_num));
     write_ini_line(fout, "externalaccess", text_t(gsdl_external_access));
-    write_ini_line(fout, "autoenter", text_t(gsdl_auto_enter));
+    write_ini_line(fout, gsdl_mode_property_prefix+"autoenter", text_t(gsdl_auto_enter));
     write_ini_line(fout, "browser", text_t(gsdl_browser));
     write_ini_line(fout, "browserexe", gsdl_browser_exe);
     write_ini_line(fout, "collections", gsdl_collections);
-    write_ini_line(fout, "start_browser", text_t(gsdl_start_browser));
+    write_ini_line(fout, gsdl_mode_property_prefix+"start_browser", text_t(gsdl_start_browser));
     write_ini_line(fout, "address_resolution_method", text_t(gsdl_address_resolution_method));
     write_ini_line(fout, "hostIP", gsdl_host_IP);
@@ -407,6 +408,11 @@
   gsdl_port_num = 80;
   gsdl_external_access = 0;
-  gsdl_auto_enter = 0;
-  gsdl_start_browser = 1;
+  if(gsdl_mode_property_prefix == "") {
+	gsdl_auto_enter = 0;
+	gsdl_start_browser = 1;
+  } else {
+	gsdl_auto_enter = 1;
+	gsdl_start_browser = 0;
+  }
 
   check_installed_browsers (netscapeneeded);
@@ -473,8 +479,8 @@
 	    gsdl_external_access = value.getint();
 	    
-	  } else if (key == "autoenter") {
+	  } else if (key == gsdl_mode_property_prefix+"autoenter") {
 	    gsdl_auto_enter = value.getint();
 	    
-	  } else if (key == "start_browser") {
+	  } else if (key == gsdl_mode_property_prefix+"start_browser") {
 	    gsdl_start_browser = value.getint();
 	
Index: main/trunk/greenstone2/runtime-src/src/w32server/settings.h
===================================================================
--- main/trunk/greenstone2/runtime-src/src/w32server/settings.h	(revision 24412)
+++ main/trunk/greenstone2/runtime-src/src/w32server/settings.h	(revision 24498)
@@ -71,4 +71,5 @@
 extern int gsdl_start_browser;
 extern int gsdl_address_resolution_method;
+extern text_t gsdl_mode_property_prefix;
 
 void Settings_Dialog(HWND window, int netscapeneeded);
