If your application can run correctly in the Windows Explorer, it could be a dependency related issue. That is, your executable depends on some DLL(s) which is not located at the working directory, current directory and other directories specified in the "PATH" environment variable.
BTW, when you post code in the forum, please use the "SRC" feature of the editor. This time i did it for you :)
"C:\\Program Files\AUTOTRADER\\projects\\WindowsApplication100\\WindowsApplication100\\bin\\Debug\\"
Bad path. You have no directory "Program FilesAUTOTRADER" under C:\
It runs notepad because that is in your PATH variable.
whroeder1:
"C:\\Program Files\AUTOTRADER\\projects\\WindowsApplication100\\WindowsApplication100\\bin\\Debug\\"
Bad path. You have no directory "Program FilesAUTOTRADER" under C:\
It runs notepad because that is in your PATH variable.
THANK YOU SO MUCH FOR THE PROMPT REPLAY
ONCE AGAIN THANK YOU SIR
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Dear sir,
I had try to execute the Following Programme
//| 1.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
#import "shell32.dll"
int ShellExecuteW(int hWnd,int lpVerb,string lpFile,string lpParameters,string lpDirectory,int nCmdShow);
#import
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- create timer
EventSetTimer(30);
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//--- destroy timer
EventKillTimer();
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
}
//+------------------------------------------------------------------+
//| Timer function |
//+------------------------------------------------------------------+
void OnTimer()
{
//---
ShellExecuteW (0,0,"WindowsApplication100.exe","C:\\Program Files\AUTOTRADER\\projects\\WindowsApplication100\\WindowsApplication100\\bin\\Debug\\","",1);
}
//+------------------------------------------------------------------+
But My Programming is not Running,
When i try to run with this same code for running "Notepad.exe", it is working Fine
I request you to Correct my code,
Thank you
Yours Respectively