call dos commands with ShellExecuteA - page 2

 

If it helps anyone around here, the main thing I figured out is that ShellExecuteA wont work reliably with familiar DOS commands within MT4 because it expects all strings to be UNICODE. Just switch the declaration from A to ShellExecuteW and your command calls will work like a charm!

e.g., to call a batch file: ShellExecuteW(0, "Open", "C:\\MyBatch.bat", 0, 0, 3);

PS: This thread shows up at the top of Google's search results w.r.t this topic, i.e., running DOS commands from MT4.. so yes, it IS relevant even after years, and I dont mind bringing this back up for air

 
RaptorUK:
It took you 4 years to post that ? why bother ? why dredge a 4 year old thread back to the top of the list just to say "you are awesome" to someone who will probably never read your post ?


Thread start date: 2009.05.21

So someone takes the time to find an already created thread that applies to what they are trying to do, so they post to it, instead of making an entirely new thread.  I don't get the reasoning why using a thread that is already there is somehow a bad thing.  It can be a resource for people who are having a similar problem to come and look at past posts regarding their problem.
 

@ JD4

Same to me (looking for DOS-related possibilities). And to honor someone for his help, probably saving a lot of someone else's time, is worth a kind of thank you anyway. What I join in.

 
RaptorUK:
It took you 4 years to post that ? why bother ? why dredge a 4 year old thread back to the top of the list just to say "you are awesome" to someone who will probably never read your post ?


Thread start date: 2009.05.21

Bro Your question is like a fool. it's works even now. only thing is it's bit changed "ShellExecuteW".. grow up bro..
 
d.saravana21:
Bro Your question is like a fool. it's works even now. only thing is it's bit changed "ShellExecuteW".. grow up bro..
RaptorUK was the most helpful person in this forum ever. Your remark is quite cheap.
 
Ovo:
RaptorUK was the most helpful person in this forum ever. Your remark is quite cheap.

you have to understand onething. if some one give good food to others he's good to them. but if he spit and give the food to me means, he is bad person to me. don't you understand?.



 
RaptorUK:
It took you 4 years to post that ? why bother ? why dredge a 4 year old thread back to the top of the list just to say "you are awesome" to someone who will probably never read your post ?


Thread start date: 2009.05.21

Posts and questions have no expiration dates.

Knock it off, man, let it go...

I came to this post and regardless of the time passed, it helped me a lot! 

 
fridayda13_2016:

Posts and questions have no expiration dates.

Knock it off, man, let it go...

I came to this post and regardless of the time passed, it helped me a lot! 

Much safer  to use FileCopy and FileDelete
Reason: