Page 1 of 1

Anyway to Access Raw Commandline?

Posted: Wed May 03, 2023 9:40 pm
by NathanH
Hi,

I have need to access the raw command line residue without using the parsing functionality of GetCommandLine(). I then thought that I could just use the GetFileArgument() instead but it gives an error if there are spaces so quotes are required. I would need the capability of quotes within those quotes which makes that an untenable workaround. Is there a way to get the raw command line without using quotes? If not, that's another one on the wish list. Thanks.

NathanH

Re: Anyway to Access Raw Commandline?

Posted: Wed May 03, 2023 9:50 pm
by plouf
you need spacing ?
GetRawArguments() fit your needs?

Re: Anyway to Access Raw Commandline?

Posted: Thu May 04, 2023 1:23 am
by NathanH
Absolutely! Need to read the whole guide file sometime. Thanks!

NathanH

Re: Anyway to Access Raw Commandline?

Posted: Thu May 04, 2023 8:34 pm
by NathanH
Hi,

I rolled out v10 to try GetRawArguments() but it doesn't give me the commandline; it does parsing of the commandline and strips quotes. It also interprets ">" as a redirection character which is unwanted behavior. Is there a way to get the commandline in raw form with no processing whatsoever? Best I've got so far is using GetFileArgument() but that requires the user to enclose their info in quotation marks. That makes the input harder than it needs to be for them. It also means they can't provide quotes in their input. Thanks.

NathanH

Re: Anyway to Access Raw Commandline?

Posted: Thu May 04, 2023 8:57 pm
by NathanH
Hi,

I'm thinking this might be an impossibility. Please correct me if I'm wrong. I think I'll need to use GetFileArgument() with quotes and have the user use single quotes inside when they mean double quotes that I can then replace. Bummer. I didn't think this was gonna be a problem. Or use a console prompt for input. Thanks.

NathanH

Re: Anyway to Access Raw Commandline?

Posted: Fri May 05, 2023 7:07 am
by plouf
NathanH wrote: Thu May 04, 2023 8:34 pm. It also interprets ">" as a redirection character which is unwanted behavior.
NathanH
I think its the os who does the > stuff also | etc.
Also i dont think tou can pass a megabyte in command line (as said to pass over entire manual) there is a limit in size
1/2 k or something

You need to ise a console input command later imho

Re: Anyway to Access Raw Commandline?

Posted: Sun May 07, 2023 11:26 am
by airsoftsoftwair
NathanH wrote: Thu May 04, 2023 8:34 pm I rolled out v10 to try GetRawArguments() but it doesn't give me the commandline; it does parsing of the commandline and strips quotes. It also interprets ">" as a redirection character which is unwanted behavior. Is there a way to get the commandline in raw form with no processing whatsoever?
No, that's not possible. GetRawArguments() is the lowest argument level on offer. This returns exactly what the OS passes to the program's entry code. Things like ">" and quotes are all handled by the console so there's no way to get them, not even for non-Hollywood programs.

Re: Anyway to Access Raw Commandline?

Posted: Mon May 08, 2023 6:31 pm
by NathanH
Thanks, I was suspecting that was the case.

NathanH