The assembly is correct because if there take exit printf and paste directly into the terminal it runs, I tried to run. Exe with administrator permission, or the calling terminal and the return is the same:
"C:\PROGRA~2\Pasta1\AUTOUP~1\UninstallApp.exe" {56D68699-5DDF-4376-85B2-05B3C268D743}Uninstall "C:\Windows\TEMP\{34D596F3-A716-4A73-98A9-AC65AD2E8DE4}\{56D68699-5DDF-4376-85B2-05B3C268D743}Uninstall.log"The syntax of the file name, directory name or volume label is incorrect.
Press any key to continue. . .
Line 16 is a buffer overrun. But that doesn't really explain why it doesn't run. Personally, I'd use CreateProcess to run an external command, I'd never use system.
You say that the string that printf display is correct, but that might not be what gets though to the system function and lower.
It might be that the only reason printf is displaying the string correctly is that nothing has trampled on the bits of your string which have massively overrun the buffer.
Try using a decent sized buffer, e.g.
1 2 3 4 5 6 7
char mess0[] = "\"C:\\PROGRA~2\\Pasta1\\AUTOUP~1\\UninstallApp.exe\" {56D68699-5DDF-4376-85B2-05B3C268D743} ";
char mess1[] = "\"C:\\Windows\\TEMP\\{34D596F3-A716-4A73-98A9-AC65AD2E8DE4}\\{56D68699-5DDF-4376-85B2-05B3C268D743}Uninstall.log\"";
char mess[1024] = ""; // to zero it
strcpy(mess,mess0);
strcat(mess,mess1);
You should consider using CreateProcess as kbw suggested (with decent sized buffer.)