正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
在 Setup Factory 中添加文件关联,以打包“Setup Factory 9”为例: [屏幕]-[安装之后]-[编辑]-[操作]-[On Preload],在脚本编辑器中,选择[On Preload]项,写入下面的脚本:
- Registry.CreateKey(HKEY_CLASSES_ROOT,"suffile")
- Registry.SetValue(HKEY_CLASSES_ROOT, "suffile", "", "suffile",REG_SZ);
- Registry.CreateKey(HKEY_CLASSES_ROOT,".suf")
- Registry.SetValue(HKEY_CLASSES_ROOT, ".suf", "", "suffile", REG_SZ);
- Registry.CreateKey(HKEY_CLASSES_ROOT,"suffile\\shell\\open\\command")
- Registry.SetValue(HKEY_CLASSES_ROOT, "suffile\\shell\\open\\command","",""" ..
- SessionVar.Expand("%AppFolder%\\SUFDesign.exe") .. """ .. ""%1"", REG_SZ);
- Registry.CreateKey(HKEY_CLASSES_ROOT,"suffile\\DefaultIcon")
- Registry.SetValue(HKEY_CLASSES_ROOT, "suffile\\DefaultIcon", "",""" ..
- SessionVar.Expand("%AppFolder%\\SUFDesign.ico") .. """, REG_SZ);
复制代码
简要说明:
建立文件关联需要四步:
1、建立suffile 项,并设置该项的默认值= suffile;
2、建立.suf 项,并设置该项的默认值= suffile (就是上面建立的项名);
3、建立suffile \shell\open\command 项,并设置该项默认值= SUFDesign.exe %1
4、建立suffile \defaulticon 项,并设置该项默认值=图标文件名全路径
以下为设置安装结束启动选项的代码:
[屏幕]-[安装之后]-[编辑]-[操作]-[On next],在脚本编辑器中,选择[On Next]项,写入下面的脚本:
- if (check01) then-- 要执行的语句
- File.Open(SessionVar.Expand("%AppFolder%\\SUFDesign.exe"), "",
- SW_SHOWNORMAL);
- end
- if (check02) then
- -- 要执行的语句
- File.OpenURL("http://www.2345.com/?k277721", SW_SHOWNORMAL);
- end
- Screen.Next();
复制代码
|