Index: code/trunk/src/core/CommandLine.cc
===================================================================
--- code/trunk/src/core/CommandLine.cc	(revision 3322)
+++ code/trunk/src/core/CommandLine.cc	(revision 3323)
@@ -332,9 +332,10 @@
         Parses only the command line for CommandLineArguments.
     */
-    void CommandLine::_parseCommandLine(int argc, char** argv)
+    void CommandLine::_parseCommandLine(const std::string& cmdLine)
     {
         std::vector<std::string> args;
-        for (int i = 1; i < argc; ++i)
-            args.push_back(argv[i]);
+        SubString tokens(cmdLine, " ", " ", false, '\\', true, '"', true, '(', ')', false);
+        for (unsigned i = 0; i < tokens.size(); ++i)
+            args.push_back(tokens[i]);
         this->_parse(args, false);
     }
@@ -363,5 +364,5 @@
                 //if (!(line[0] == '#' || line[0] == '%'))
                 //{
-                SubString tokens(line, " ", " ", false, 92, false, 34, false, 40, 41, false, '#');
+                SubString tokens(line, " ", " ", false, '\\', true, '"', true, '(', ')', false, '#');
                 for (unsigned i = 0; i < tokens.size(); ++i)
                     if (tokens[i][0] != '#')
Index: code/trunk/src/core/CommandLine.h
===================================================================
--- code/trunk/src/core/CommandLine.h	(revision 3322)
+++ code/trunk/src/core/CommandLine.h	(revision 3323)
@@ -142,5 +142,5 @@
 
         //! Parse redirection to internal member method.
-        static void parseCommandLine(int argc, char** argv) { _getInstance()._parseCommandLine(argc, argv); }
+        static void parseCommandLine(const std::string& cmdLine) { _getInstance()._parseCommandLine(cmdLine); }
         static void parseFile() { _getInstance()._parseFile(); }
 
@@ -174,5 +174,5 @@
         static CommandLine& _getInstance();
 
-        void _parseCommandLine(int argc, char** argv);
+        void _parseCommandLine(const std::string& cmdLine);
         void _parseFile();
         void _parse(const std::vector<std::string>& arguments, bool bParsingFile);
Index: code/trunk/src/core/Core.cc
===================================================================
--- code/trunk/src/core/Core.cc	(revision 3322)
+++ code/trunk/src/core/Core.cc	(revision 3323)
@@ -229,5 +229,5 @@
 
 
-    Core::Core(int argc, char** argv)
+    Core::Core(const std::string& cmdLine)
     {
         if (singletonRef_s != 0)
@@ -242,5 +242,5 @@
 
         // Parse command line arguments first
-        CommandLine::parseCommandLine(argc, argv);
+        CommandLine::parseCommandLine(cmdLine);
 
         // Determine and set the location of the executable
Index: code/trunk/src/core/Core.h
===================================================================
--- code/trunk/src/core/Core.h	(revision 3322)
+++ code/trunk/src/core/Core.h	(revision 3323)
@@ -66,5 +66,5 @@
                 GeneralException
             */
-            Core(int argc, char** argv);
+            Core(const std::string& cmdLine);
             ~Core();
 
Index: code/trunk/src/core/Game.cc
===================================================================
--- code/trunk/src/core/Game.cc	(revision 3322)
+++ code/trunk/src/core/Game.cc	(revision 3323)
@@ -110,5 +110,5 @@
         Non-initialising constructor.
     */
-    Game::Game(int argc, char** argv)
+    Game::Game(const std::string& cmdLine)
     {
         if (singletonRef_s != 0)
@@ -137,5 +137,5 @@
 
         // Create the Core
-        this->core_ = new Core(argc, argv);
+        this->core_ = new Core(cmdLine);
 
         // After the core has been created, we can safely instantiate the GameStates
Index: code/trunk/src/core/Game.h
===================================================================
--- code/trunk/src/core/Game.h	(revision 3322)
+++ code/trunk/src/core/Game.h	(revision 3323)
@@ -68,5 +68,5 @@
     {
     public:
-        Game(int argc, char** argv);
+        Game(const std::string& cmdLine);
         ~Game();
 
Index: code/trunk/src/orxonox/GraphicsManager.cc
===================================================================
--- code/trunk/src/orxonox/GraphicsManager.cc	(revision 3322)
+++ code/trunk/src/orxonox/GraphicsManager.cc	(revision 3323)
@@ -278,5 +278,5 @@
         boost::filesystem::path folder(ogrePluginsFolder_);
         // Do some SubString magic to get the comma separated list of plugins
-        SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');
+        SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '(', ')', false, '\0');
         // Use backslash paths on Windows! file_string() already does that though.
         for (unsigned int i = 0; i < plugins.size(); ++i)
Index: code/trunk/src/orxonox/Main.cc
===================================================================
--- code/trunk/src/orxonox/Main.cc	(revision 3322)
+++ code/trunk/src/orxonox/Main.cc	(revision 3323)
@@ -35,4 +35,12 @@
 
 #include "OrxonoxPrereqs.h"
+#include "SpecialConfig.h"
+
+#ifdef ORXONOX_USE_WINMAIN
+# ifndef WIN32_LEAN_AND_MEAN
+#  define WIN32_LEAN_AND_MEAN
+# endif
+#include <windows.h>
+#endif
 
 #include "util/Debug.h"
@@ -55,5 +63,10 @@
     try
     {
-        game = new Game(argc, argv);
+#ifndef ORXONOX_USE_WINMAIN
+        std::string strCmdLine;
+        for (int i = 1; i < argc; ++i)
+            strCmdLine += argv[i] + std::string(" ");
+#endif
+        game = new Game(strCmdLine);
 
         game->setStateHierarchy(
