15.05.2018, 13:14
|
Новичок
|
|
Регистрация: 28.07.2009
Сообщения: 85
Репутация: 50
|
|
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
ShellExecuteInfo: TShellExecuteInfo;
begin
ShellExecuteInfo.cbSize:= SizeOf(TShellExecuteInfo);
ShellExecuteInfo.fMask:= 0;
ShellExecuteInfo.Wnd:= 0;
ShellExecuteInfo.lpVerb:= 'runas';
ShellExecuteInfo.lpFile:= PChar(ParamStr(0));
ShellExecuteInfo.lpParameters:= PChar('/INSTALL');
ShellExecuteInfo.lpDirectory:= nil;
ShellExecuteInfo.nShow:= SW_SHOWNORMAL;
ShellExecuteEx(@ShellExecuteInfo)
end;
|