Reputation: 6791
I try to create visual studio post-build event command line and i want:
start taskkill /f /im app.exe /t & xcopy /y "$(TargetPath)" "C:\Program Files (x86)\path\$(TargetFilename)" & start "" "C:\Program Files (x86)\program\app.exe"
I use start taskkill /f /im app.exe /t
instead of taskkill /f /im app.exe /t
because if the process not exists i get not found
error
Now all tree command runs OK with no error but the last command not launch the program but if i execute this command separately the program is executed.
How can i fix this?
Upvotes: 0
Views: 1047
Reputation: 56218
You have a Timing Problem.
Try:
start /wait taskkill /f /im app.exe /t & xcopy /y "D:\Workspaces\Dev\path\bin\Debug\my.dll" "C:\Program Files (x86)\path\my.dll" & start "" "C:\Program Files (x86)\program\app.exe"
Upvotes: 1