//卸载信息写入注册表和ini文件 ARegistry := TRegistry.Create; try with ARegistry do begin RootKey := HKEY_LOCAL_MACHINE; //HKEY_LOCAL_MACHINE if OpenKey('SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/' + SoftName + '/', True) then begin Fini := TIniFile.Create(InIUninName); try WriteString('DisplayName', '卸载' + SoftName); WriteString('UninstallString', SetupPath + SoftDir + '/uninst32.exe'); Regi := 2; //关键词数量 // ShowMessage('注册表' + IntToStr(Regi)); Fini.WriteInteger('RegList', 'Regi', Regi); Fini.WriteString('RegList', 'RegS1', 'HKEY_LOCAL_MACHINE,' + 'SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/' + SoftName + '/,' + 'UninstallString'); Fini.WriteString('RegList', 'RegS2', 'HKEY_LOCAL_MACHINE,' + 'SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/' + SoftName + '/,' + 'DisplayName'); RegKi := 1; //主键数量 Fini.WriteInteger('RegList', 'RegKi', RegKi); Fini.WriteString('RegList', 'RegKS1', 'HKEY_LOCAL_MACHINE,' + 'SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/' + SoftName + '/'); finally Fini.Free; end; end; end; finally ARegistry.CloseKey; //关闭主键 ARegistry.Free; end;{在我的安装程序中截一段代码给你参考,写入注册表就可以在'添加或删除程序’找到这个卸载软件,你自己要先要做一个卸载的exe,如写了一个uninst32.exe}