Files
lsecqt-OffensiveCpp/WinAPI Examples/ShellExecuteEx/ShellExecuteEx.cpp
T
2023-04-11 02:20:27 -07:00

12 lines
229 B
C++

#include <windows.h>
int main()
{
SHELLEXECUTEINFOW info = { sizeof(SHELLEXECUTEINFOW) };
info.lpFile = L"cmd.exe";
info.lpParameters = L"/c whoami";
info.nShow = SW_HIDE;
info.lpVerb = L"open";
::ShellExecuteEx(&info);
}