var
FCommandLine, FArgs : String;
start: TStartupInfo;
sec: TSecurityAttributes;
pinfo: TProcessInformation;
Begin
FillChar(start, sizeof(STARTUPINFO), 0);
start.cb := sizeof(start);
start.wShowWindow := SW_SHOWDEFAULT;
sec.nLength := sizeof(sec);
sec.lpSecurityDescriptor := nil;
sec.bInheritHandle := true;
FCommandLine := 'C:\Windows\System32\Notepad.exe';
FArgs := 'C:\a.txt';
CreateProcess(PChar(FCommandLine), PChar(FArgs), @sec, @sec, true, 0, nil, nil, start, pinfo)
End;
이렇게 했는데요.
노트패드는 실행되는데 노트패드에서 C:\a.txt를 불러오질 못합니다.
해결부탁드립니다.
|