mIRC Homepage
Posted By: 5618 run command with subsequent quotes - 24/06/07 06:17 PM
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?
Posted By: Collective Re: run command with subsequent quotes - 24/06/07 06:45 PM
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.
Posted By: 5618 Re: run command with subsequent quotes - 24/06/07 06:49 PM
Hehe, that's funny. Someone on IRC just suggested using $shortfn() to me and yes, it does indeed work.
Still, the "problem" remains.
Posted By: Collective Re: run command with subsequent quotes - 24/06/07 06:51 PM
The problem is not mIRC's, see the above.
Have you tried using the dos format of the dir structure?

Ex:

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


-genius_at_work
Posted By: 5618 Re: run command with subsequent quotes - 24/06/07 07:36 PM
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.
© mIRC Discussion Forums