In Git Extensions..
- "Reset current branch to here"
- Select Soft
- Commit
std::string g_PostScript;
int main()
{
g_PostScript+="notepad.exe \"hello.txt\" & "; //add a command
g_PostScript+="uninstall.exe & "; //and another one..
//time to exit
ApplyPostScript();
return 0;
}
void ApplyPostScript()
{
if (g_PostScript.length()==0)
return;
g_PostScript="cmd.exe /C ping 1.1.1.1 -n 1 -w 3000 > Nul & "+g_PostScript;
STARTUPINFO si = {0};
PROCESS_INFORMATION pi = {0};
CreateProcess(NULL, (LPSTR)g_PostScript.c_str(), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
}