Cody Brocious
public python v1 · immutableimport ctypes, sysGetCommandLineW = ctypes.windll.kernel32.GetCommandLineWGetCommandLineW.restype = ctypes.c_wchar_pargs = GetCommandLineW()numArgs = ctypes.c_int(0)CommandLineToArgvW = ctypes.windll.shell32.CommandLineToArgvWres = CommandLineToArgvW(args, ctypes.byref(numArgs))args = (ctypes.c_wchar_p * numArgs.value).from_address(res)sys.argv = []for arg in args[1:]: sys.argv.append(arg)