%WO %WT Parameters

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

%WO %WT Parameters

Post by *Hurdet »

Why not exist %WO %WT Parameters?
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: %WO %WT Parameters

Post by *gdpr deleted 6 »

Uh, i guess for the same reason no %BF parameter exist.

Perhaps start your question with explaining what your idea behind %WO %WT is.
(Unless you want people to engage in sharing their ideas of what you possibly mean by writing %WO %WT. ;-) )
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

Re: %WO %WT Parameters

Post by *Hurdet »

%O places the current filename without extension into the command line.
%T inserts the current target path. Especially useful for packers.
To a good connoisseur...
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: %WO %WT Parameters

Post by *gdpr deleted 6 »

And what should the "W" be about? Do you mean Unicode?

If so, your request is not making much sense, and is based on a misconception how things work in Windows.

When starting a process (running an executable), the command line is usually passed as Unicode. Parsing the command line string and possible conversion from Unicode to local-code page is part of the application start-up code (usually this start-up code is generated by the compiler or linker). In other words: The invoked application deals with the Unicode command line string as it sees fit. It is not the invoker/caller which determines how the called application deals with command line strings. The command line strings (normally) are Unicode to begin with.

If you use a Unicode wmain function (as described here: here: https://docs.microsoft.com/en-us/cpp/c-language/using-wmain?view=vs-2019 ), there will be no conversion from Unicode to local code page taking place, and the problem (which i just speculate about, since i don't really know) should go away...
Last edited by gdpr deleted 6 on 2020-09-12, 19:57 UTC, edited 1 time in total.
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

Re: %WO %WT Parameters

Post by *Hurdet »

but if it were as you say, then why instead exist?
%UL,%UF
like %L and %F, but with UTF-8 Unicode list file (with byte order mark)
%WL,%WF
like %L and %F, but with a UTF-16 Unicode list file (with byte order mark)
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: %WO %WT Parameters

Post by *gdpr deleted 6 »

Read carefully. It says "Unicode list file". The "U"/"W" prefix there is NOT about the command line, but indicating the type of encoding to be used in the list file.
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

Re: %WO %WT Parameters

Post by *Hurdet »

I understand, ty.
Post Reply