visual studio 2005 - system command not running exe file using variable as param -


I am writing code to download an app in Visual Studio 2005 (VC ++). After downloading it, when I start running it 3 line exe file does not run, while I write it as

  system ("c: /pg/ap/app.exe")   

Does it start to run, can someone tell me why this is happening? 1.const char * str; 2. HRESULT hr = URLDownloadToFile (NULL, _T ("file_path / app.exe"), (LPCWT) str, 0, NULL); 3. System (str);

Instead using the system () function, Try shellExecute () , this will solve your problem.

For more help

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

java - Reaching JTextField in a DocumentListener -

c# - Add Image in a stackpanel based on textbox input -