mIRC Home    About    Download    Register    News    Help

Print Thread
5
5618
5618
5
I'm trying to run an .exe from mIRC with appended arguments, one of them requiring quotes. In simple form:

/run cmd /C "C:\Program Files\....exe" -U "string"

However, when I do this I get an error in command prompt which tells me it's trying to run "C:\Program". So mIRC's either ignoring the first quote or pairing up the second and third for some reason. It works perfectly fine from command prompt itself or without the additional string quotes (and thus the argument).
I tried $qt() and $chr(34), but both these methods do not work. For obvious reasons, I'd say.
So is there a way around this? Is it simply not possible two use two sets of quotes in the /run command or it is a bug?

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
I get the same error regardless of where I enter the cmd command; mIRC's /run, Start -> Run and Command Prompt all give the same error.
Code:
C:\Program Files\mIRC>cmd /C "C:\Program Files\mIRC\mirc.exe" -U "string"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
It is likely a limitation of cmd.exe, using the $shortfn()'d filename instead should work.

5
5618
5618
5
Hehe, that's funny. Someone on IRC just suggested using $shortfn() to me and yes, it does indeed work.
Still, the "problem" remains.

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
The problem is not mIRC's, see the above.

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
Have you tried using the dos format of the dir structure?

Ex:

c:\progra~1\mirc\mirc.exe


-genius_at_work

5
5618
5618
5
Originally Posted By: genius_at_work
Have you tried using the dos format of the dir structure?

Ex:

c:\progra~1\mirc\mirc.exe

Yes, that is what $shortfn() does. And yes, I realise the problem is not mIRC's. At first I thought it was, since it didn't happen in command prompt, but obviously it's not mIRC directly sending to the command prompt.

Last edited by 5618; 24/06/07 07:36 PM.

Link Copied to Clipboard