I need to run windows program with command line parameters?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Alucard-sama
Newbie
Newbie
Posts: 3
Joined: Mon Mar 10, 2008 12:59 am

I need to run windows program with command line parameters?

Post by Alucard-sama »

In Windows; to have Firefox pass psyn links to the Curse client I use this command:

Code: Select all

"C:\Program Files\Curse\CurseClient.exe" -url "%1"
but when I try to get Linux's Firefox to pass the psyn link to the Curse client running in wine, wine of course assumes that -url and the quotation marks are for it and not the actual Windows command it's meant to run.
How do I get wine to run the correct equivalent to the above command?

PS: Sorry I know it's a poorly orchestrated explanation of the problem...
User avatar
L. Rahyen
Moderator
Moderator
Posts: 338
Joined: Fri Feb 22, 2008 9:13 pm

I need to run windows program with command line parameters?

Post by L. Rahyen »

On 2008-12-08 (Monday) 02:53:05 Alucard-sama wrote:
In Windows; to have Firefox pass psyn links to the Curse client I use this
command:

Code:
"C:\Program Files\Curse\CurseClient.exe" -url "%1"


but when I try to get Linux's Firefox to pass the psyn link to the Curse
client running in wine, wine of course assumes that -url and the quotation
marks are for it and not the actual Windows command it's meant to run. How
do I get wine to run the correct equivalent to the above command?
You didn't give exact command you are trying to run (with Wine) so I guess
this is something like this:

wine "C:\Program Files\Curse\CurseClient.exe" -url "%1"

But of course all quotes disappear. And no, this isn't because "Wine assumes
that -url and quotation marks are for it" - it is because your shell assumes
that quotation marks are for it (and there is good technical reasons for
this). So you need to tell your shell that you want to preserve quotation
marks in the parameter; this can be done in many ways. Here is just two
examples:

wine "C:\Program Files\Curse\CurseClient.exe" -url \"%1\"

...or this:

wine "C:\Program Files\Curse\CurseClient.exe" -url '"%1"'

In both cases your shell will preserve quotation marks around "%1".
PS: Sorry I know it's a poorly orchestrated explanation of the problem...
To make better explanation you need to provide exact commands you are trying
to run. In case if above doesn't help and you need farther assistance please
don't forget to provide commands with Wine you are trying to use.


Thank you for using Wine.
James McKenzie

I need to run windows program with command line parameters?

Post by James McKenzie »

Alucard-sama wrote:
In Windows; to have Firefox pass psyn links to the Curse client I use this command:

Code:
"C:\Program Files\Curse\CurseClient.exe" -url "%1"

If you are passing this from Linux you might need to add the grave
accent command at the beginning and end of the command like this:

`"C:\Program Files\Curse\CurseClient.exe" -url "%1"`
but when I try to get Linux's Firefox to pass the psyn link to the Curse client running in wine, wine of course assumes that -url and the quotation marks are for it and not the actual Windows command it's meant to run.
How do I get wine to run the correct equivalent to the above command?

PS: Sorry I know it's a poorly orchestrated explanation of the problem...
James McKenzie
Locked