|
正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- [code]
- {此处套用老虎版主卸载父键和子健的Code代码(用下面的代码不但可以删除该所指键下面所有的子键,同时也可以删除
- 它上面所有的父键。而且该代码仅删除空白父键,也就是说如果父键中包含其它应用程序创建的内容,那么将不被删除)}
- procedure TotalDeleteRegKey(rKey: integer; sKey: string; deletesubkeys: boolean);
- var
- s: string;
- begin
- s := sKey;
- if deletesubkeys then
- RegDeleteKeyIncludingSubkeys(rKey, sKey)
- else
- RegDeleteKeyIfEmpty(rKey, sKey);
- if Pos('\', s) <> 0 then
- begin
- while s[Length(s)] <> '\' do
- Delete(s, Length(s), 1);
- Delete(s, Length(s), 1);
- TotalDeleteRegKey(rKey, s, false);
- end;
- end;
- procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
- var
- ResultCode: Integer;
- begin
- case CurUninstallStep of
- usUninstall:
- begin // 开始卸载
- TotalDeleteRegKey(HKCU, ExpandConstant('Software\Unigraphics Solutions\NX\8.5'), true);
- Exec(ExpandConstant('{app}\NX 8.5\UGSLicensing\uninst000.bat'), '', ExpandConstant('{app}\NX 8.5\UGSLicensing'), SW_SHOWNORMAL, ewNoWait, ResultCode);
- end;
- usPostUninstall:
- begin // 卸载完成
- // MsgBox('CurUninstallStepChanged:' #13#13 '卸载完成.', mbInformation, MB_OK);
- // ...这里插入代码来执行post-uninstall任务...
- ShellExec('open', 'http://blog.sina.com.cn/ttd2015', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode); //卸载后打开网页
- end;
- end;
- end;
复制代码
如果想要卸载完毕后再打开网址,修改为
- usDone:
- begin // 卸载完成
- ShellExec('open', 'http://blog.sina.com.cn/ttd2015', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode); //卸载后打开网页
- end;
复制代码
|
|