1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
var
wd, dir : string;
begin
wd := Path[CSIDL_SYSTEM] ; //GetSystemDossier= C:\Windows\System32
dir := 'C:\WINDOWS\PCHealth\HelpCtr\Binaries\';
if ckxp.checked then begin
If not FileExists(dir + 'msconfig.exe') Then ShowMessage('Sous XP, ce fichier "msconfig.exe" devrait exister dans le dossier "C:\Windows\PCHealth\HelpCtr\Binaries\" !');
ShellExecute(Handle,'Open', PChar(dir + 'msconfig.exe'),nil,nil,SW_SHOWDEFAULT) //ShellExecute(0, nil, PChar(dir +'msconfig.exe'), nil, nil, 0)else
end
else
try
Wow64DisableWow64FsRedirection(Wow64FsEnableRedirection);
If not FileExists(wd + 'msconfig.exe') Then ShowMessage('Sous Seven, ce fichier "msconfig.exe" devrait exister dans le dossier "C:\Windows\System32\" !');
ShellExecute(0, nil, PChar(wd + 'msconfig.exe'), nil, nil, 0);
Wow64EnableWow64FsRedirection(Wow64FsEnableRedirection);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end; |
Partager