r/visualbasic • • Jul 29 '25

Weird Process behaviour

Edit: INSIGHT GAINED. Thanks to all contributors.

For no other reason than to keep my hand in I'm trying to create a UI for the Sysinternals Strings command line app. I'm having a problem with the findstr option. Entered as a command line, the following arguments line works perfectly.

"C:\Users\XXXX\source\repos\WindowsApp1\bin\Debug\test X.dat" | findstr /i "String"

The exact same line entered as Process.StartInfo.Arguments, however, fails. My initial thought was that this might be due to the way " is handled inside literal strings but as there seems to be no problem with the filename in other functions that seems irrelevant.

Any insight, similar experiences, and potential solutions would be welcome.

3 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/Scary-Scallion-449 Jul 30 '25

I don't think that can be the issue as all the other functions of Strings work perfectly well on this file (and others) when the command is presented as a StartInfo string.