to woodstock
我按照你说的方法做了,可是还是不行!
代码如下:请指教~
Const
FPath = '/Software/Microsoft/Office/9.0/Excel/InstallRoot';
Office2KPremium = '{00000409-78E1-11D2-B60F-006097C998E7}';
Office2KProfessional = '{00010409-78E1-11D2-B60F-006097C998E7}';
Office2KStandard = '{00020409-78E1-11D2-B60F-006097C998E7}';
Office2KSBE = '{00030409-78E1-11D2-B60F-006097C998E7}';
DHTMLEditOCX = 'dhtmled.ocx';
Var
Reg : TRegistry;
begin
{解决在启动时调用OFFICE2K的安装程序的问题}
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.KeyExists(FPath) then
begin
Winexec(Pchar('msiexec /i '+Office2KPremium+' /qb- REMOVE=HTMLSourceEditing'),SW_HIDE);
Winexec(Pchar('msiexec /i '+Office2KProfessional+' /qb- REMOVE=HTMLSourceEditing'),SW_HIDE);
Winexec(Pchar('msiexec /i '+Office2KStandard+' /qb- REMOVE=HTMLSourceEditing'),SW_HIDE);
Winexec(Pchar('msiexec /i '+Office2KSBE+' /qb- REMOVE=HTMLSourceEditing'),SW_HIDE);
WinExec(PChar('regsvr32 '+ExtractFilePath(Application.ExeName)+DHTMLEditOCX),SW_HIDE);
end;
Finally
Reg.Free;
end;
显示的结果还是不行!仍然会调用Office安装程序并提示要光盘!如果取消可以进入程序,但再次启动仍旧要调用!