protected override void OnAfterUninstall(IDictionary savedState) { base.OnAfterUninstall(savedState); string path = this.Context.Parameters["targetdir"]; for (int i = 0; i < Extensions.Length; i++) { RegistryAPP app = new RegistryAPP(); app.APPKey = "QDJJ" + Extensions[i].ToUpper(); app.DefaultIcon = path + (i + 1) + ".ico"; app.AppPath = path + "JJRJ_ERP_QDJJ.exe"; app.Extension = Extensions[i]; URegist(app); } }
protected override void OnCommitted(IDictionary savedState) { string path = this.Context.Parameters["targetdir"]; for (int i = 0; i < Extensions.Length; i++) { RegistryAPP app = new RegistryAPP(); app.APPKey = "QDJJ" + Extensions[i].ToUpper(); app.DefaultIcon = path + (i + 1) + ".ico"; app.AppPath = path + "JJRJ_ERP_QDJJ.exe"; app.Extension = Extensions[i]; Regist(app); } m_ServiceInstall.InstallService(savedState, path + "GOLDSOFT.SERVICES.exe"); base.OnCommitted(savedState); }
private void URegist(RegistryAPP app) { ToolKit.DelRelate(app.APPKey); ToolKit.DelRelate(app.Extension); }
private void Regist(RegistryAPP app) { ToolKit.WriteApp(app.AppPath, app.DefaultIcon, app.APPKey); ToolKit.WriteRelate(app.Extension, app.APPKey); }