`

setupfactory 操作 注册表例子

阅读更多

//判断注册表里是否有安装火狐的记录

result = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mozilla\\Firefox");
if(result==true)
then
result1 = Dialog.Message("注意", "你的电脑已经安装火狐是否重新安装?", MB_OKCANCEL, MB_ICONINFORMATION, MB_DEFBUTTON1);
if(result1==1)
then
Shell.Execute(SessionVar.Expand("%AppFolder%\\Firefox-full-latest.exe"), "open", "", "", SW_SHOWNORMAL);

end;
else

result1 = Dialog.Message("注意", "你的电脑没有安装火狐请点击确认安装?", MB_OKCANCEL, MB_ICONINFORMATION, MB_DEFBUTTON1);
if(result1==1)
then
Shell.Execute(SessionVar.Expand("%AppFolder%\\Firefox-full-latest.exe"), "open", "", "", SW_SHOWNORMAL);

end;
end;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics