--- a/autopano-c-complete.sh
+++ b/autopano-c-complete.sh
@@ -26,11 +26,20 @@
 	exit 1
 fi
 
-if [ `uname` = "Linux" ] ; then
+
+os=`uname`
+echo "uname: $os"
+
+if [ $os = "Linux" ] ; then
     args=`getopt -o o:s:p:nch -l output:,size:,points:,noransac,clean,help \
          -n "$0" -- "$@"`
     # Note the quotes around `$TEMP': they are essential!
     eval set -- "$args"
+elif [ $os = "WindowsNT" ]; then
+    echo "On windows"
+    # do simplified command line parsing, getopt is not available.
+    # all non options arguments need to be specified after the
+    # -- option.
 else
     # Be conservative and accept only one-letter options.
     # This works fine at least on FreeBSD.