...
implementation
uses Registry, ShellApi;
procedure EnableAutoInvoke;
var
R: TRegistry;
begin
R := TRegistry.Create;
try
R.RootKey := HKEY_CURRENT_USER;
R.OpenKey('Software\Microsoft\TabletTip\1.7', True);
R.WriteInteger('EnableDesktopModeAutoInvoke', 1);
R.CloseKey;
finally
R.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
EnableAutoInvoke; ShellExecute(0,
'runas',
'C:\Program Files\Common Files\microsoft shared\ink\tabtip.exe',
'',
'',
SW_SHOWNORMAL);
end;