Archive: DOS 126 Character Limit?


DOS 126 Character Limit?
Alright I'm trying to do some search and replace hex editing in a file.

Originally my plan was to use General Search and Replace because it works very well and is a small utility. However, I must pass it the parameters via the command line. Calling it from cmd.exe (manually testing) and via Exec, ExecShell, and nsExec does not seem to work. Upon further research, I discovered dos has a 126 character limit. The whole command is probably 300 characters or so.

So, I found an alternative. For the time being, I am using XVI32 which supports it's own scripts. It works, however when the script runs, the XVI32 window flashes while the script runs (a second or less). There is no way to hide it, not with commands in the XVI script nor using SW_HIDE or /MIN (MIN hides it but the script will not run when mimized for some who knows what reason).

What I would like is a way to use the command line and just pass my parameters to General Search and Replace. If anyone knows of a workaround I'd love to know.


MS: "Any batch file line exceeding 127 bytes is truncated at 127 bytes before it is processed." :(
If you can recompile gsar with -F option enabled for Wins, then you can use ExecDos plug-in with parameters moved to the stdin string emulation. May be :)