I trying to execute following bat file in c++ using win32 api.Following is code for execution.
//#include "Shellapi.h"
#include "Windows.h"
int _tmain(int argc, _TCHAR* argv[])
{
ShellExecute(GetDesktopWindow(), "sa.bat","", NULL, NULL, SW_SHOWNORMAL);
DWORD LastError = GetLastError();
return 0;
}
but it is not working.
following is content "sa.bat"
C:\windows\system32\wusa /uninstall /kb:2718695 /quiet /forcerestart
but last error returns 1155.