call dos commands with ShellExecuteA

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
1
teknomage 2015.07.21 07:28 #
 

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


avatar
313
JD4 2015.07.21 20:32 #
 
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.
avatar
19
Sya 2015.08.07 11:37 #
 

@ 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.


avatar
54
d.saravana21 2015.10.12 06:56 #
 
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..
avatar
1109
Ovo 2015.10.12 16:16 #
 
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.
avatar
54
d.saravana21 2015.10.17 08:45 #
 
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?.



avatar
4
fridayda13_2016 2016.07.16 23:56 #
 
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! 

avatar
164
rod178 2016.07.18 06:55 #
 
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
Back to topics list   | 1 2  

To add comments, please log in or register