import depends # import dependencies so that py2exe finds them
_junk = depends # appease pyflakes
+import sys
+from ctypes import WINFUNCTYPE, POINTER, byref, c_wchar_p, c_int, windll
from allmydata.scripts import runner
-runner.run(install_node_control=False)
+
+GetCommandLineW = WINFUNCTYPE(c_wchar_p)(("GetCommandLineW", windll.kernel32))
+CommandLineToArgvW = WINFUNCTYPE(POINTER(c_wchar_p), c_wchar_p, POINTER(c_int)) \
+ (("CommandLineToArgvW", windll.shell32))
+
+argc = c_int(0)
+argv = CommandLineToArgvW(GetCommandLineW(), byref(argc))
+argv_utf8 = [argv[i].encode('utf-8') for i in xrange(1, argc.value)]
+
+rc = runner(argv_utf8, install_node_control=False)
+sys.exit(rc)
\ No newline at end of file