c++ - Windows Qt Invoke batch file and exit the App -


i developing application in windows8 using qt, need create updater it. have wrote update downloader part, , update script replace previous content newly downloaded data.

now need execute bat file application itself, , exit app before script executed, because script going remove dlls , application binary running.

how can resolve issue?

thanks haris

you can use qprocess::startdetached run instance of command prompt batch file argument in new process , detach it. after should exit application :

qprocess::startdetached("cmd.exe", qstringlist() << "/c" << "path\\to\\mybat.bat"); qapp->quit(); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -