Vielleicht funktionier dies?
Delphi-Quellcode:
var
shellExecuteInfo: TShellExecuteInfo;
filePath := 'c:\Users\TF\Delphi\Devcon\WDK7.1.0\'
parameter := '';
ZeroMemory(@shellExecuteInfo, SizeOf(TShellExecuteInfo));
shellExecuteInfo.cbSize := sizeOf(TShellExecuteInfo);
shellExecuteInfo.hwnd := 0;
shellExecuteInfo.lpVerb := 'open';
shellExecuteInfo.lpFile := pchar('DisEnPIO.bat');
shellExecuteInfo.fMask := SEE_MASK_NOCLOSEPROCESS;
shellExecuteInfo.lpParameters := pChar(parameter);
shellExecuteInfo.lpDirectory := pChar(filePath);
shellExecuteInfo.nShow := SW_HIDE;
if not shellExecuteEx(@shellExecuteInfo) then
showMessage(IntToStr(getLastError));
Grüße
Klaus