CODE:#define STARTF_USESHOWWINDOW 1
#define INFINITE -1
external(INT, "CreateProcess", "CreateProcessA", "Kernel32.dll");
external(INT, "WaitForSingleObject", "WaitForSingleObject", "Kernel32.dll");
external(INT, "CloseHandle", "CloseHandle", "Kernel32.dll");
cmd("/c chcp 1251 >nul & SYSTEMINFO > C:\info.txt");
start("C:\info.txt");
function cmd(string CommandLine)
{
int STARTUPINFOA[17], PROCESS_INFORMATION[4];
initialarray(#STARTUPINFOA[0], 0);
STARTUPINFOA[0]=68;
STARTUPINFOA[11]=STARTF_USESHOWWINDOW;
if(CreateProcess(0, "cmd.exe "+CommandLine, 0, 0, 0, 0, 0, 0, address(#STARTUPINFOA[0]), address(#PROCESS_INFORMATION[0])))
{
WaitForSingleObject(PROCESS_INFORMATION[0], INFINITE);
CloseHandle(PROCESS_INFORMATION[0]);
}
} |