C# Process.Start parameters truncated

后端 未结 2 865
面向向阳花
面向向阳花 2021-01-23 02:04

I\'ve got truncated parameters when passing very long file paths. I need to start a program and pass it everything via command params - sometimes it just truncates the command.

2条回答
  •  旧巷少年郎
    2021-01-23 02:42

    I'm not sure what your question is, but there is a limitation on the commandline. This same limitation will be valid for Process.Start(command,args)

    On computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the maximum length of the string that you can use at the command prompt is 2047 characters.

提交回复
热议问题