I want to open a *.conf file. I want to open this file with the standard Windows editor (e.g., notepad.exe).
I currently have this ShellExecute code:
var
sPath, conf: String;
begin
try
sPath := GetCurrentDir + 'conf';
conf := 'nginx.conf';
ShellExecute(Application.Handle, 'open', PChar(conf), '', Pchar(sPath+conf), SW_SHOW);
except
ShowMessage('Invalid config path.');
end;
end;
But nothing happens. So what should I change?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…