diff -r 7a10069855c4 setup.py
--- a/setup.py	Thu Jul 30 17:17:53 2009 -0700
+++ b/setup.py	Mon Sep 07 20:20:48 2009 -0700
@@ -51,13 +51,25 @@ object reference system, and a capabilit
         'scripts': ["bin/flogtool", "bin/flappserver", "bin/flappclient"],
 }
 
+have_setuptools = False
 try:
     # If setuptools is installed, then we'll add setuptools-specific
-    # arguments to the setup args.
+    # arguments to the setup args. If we're on windows, this includes
+    # entry_points= scripts to create the appropriate .bat files.
     import setuptools
+    have_setuptools = True
 except ImportError:
     pass
-else:
+
+if have_setuptools:
+    import platform
+    if platform.system() == "Windows":
+        del setup_args["scripts"]
+        setup_args["entry_points"] = {"console_scripts": [
+            "flogtool = foolscap.logging.cli.run_flogtool",
+            "flappserver = foolscap.appserver.cli:run_flappserver",
+            "flappclient = foolscap.appserver.client:run_flappclient",
+            ] }
     setup_args['install_requires'] = ['twisted >= 2.4.0']
     setup_args['extras_require'] = { 'secure_connections' : ["pyOpenSSL"] }
     # note that pyOpenSSL-0.7 and recent Twisted causes unit test failures,
