xnview自动安装脚本求助
个人比较喜欢xnview,体积小功能够用。一直用龙卷风论坛的1.7版,但不喜欢里面带的picaview插件,在老机器上运行纯属噩梦。做自动安装脚本是在“选择功能与组件”处遇到困难,盼高手指教。
选择“不安装此功能”如何用脚本实现呢? 本帖最后由 lpxx 于 2009-5-10 20:44 编辑
你好,龙卷风论坛的版本我没有用过,我一直用1.74版本,没听说需要什么插件之类的。
提供我的源文件及其安装程序给你参考,我也是初学者,不要笑话。
下载: 谢谢楼上的帮助
你的1.74版本也带那个picaview插件
不过你的1.74版容易取消
我在你的代码后面加了个Send("{down}{down}{down}{down}{SPACE}")就可以取消选择了
安装完比1.7的稍大点
不过还能接受:face (33): 官方版本就带中文界面,也没有这个picaview插件,附送个安装代码
;清空以前的快捷方式信息
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\XnView_is1","Inno Setup: Selected Tasks")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\XnView_is1","Inno Setup: Deselected Tasks")
;######################
run("xnview-win-full.exe")
WinWaitActive("Setup - XnView","Welcome to the XnView Setup Wizard")
Send("!n")
WinWaitActive("Setup - XnView","License Agreement")
Send("!a")
Send("!n")
WinWaitActive("Setup - XnView","Select Destination Location")
ControlSetText("Setup - XnView","","",@ProgramFilesDir & "\XnView")
Send("!n")
If WinExists("Folder Exists","") Then
Send("!y")
EndIf
WinWaitActive("Setup - XnView","Select Components")
ControlCommand("Setup - XnView","","","SelectString", 'Full installation')
Send("!n")
WinWaitActive("Setup - XnView","Select Start Menu Folder")
ControlSetText("Setup - XnView","","","XnView")
Send("!n")
WinWaitActive("Setup - XnView","Select Additional Tasks")
Send("!q")
Send("!n")
WinWaitActive("Setup - XnView","Ready to Install")
Send("!i")
WinWaitActive("Setup - XnView","Completing the XnView Setup Wizard")
Send("!f")
;自定义设置
FileCopy("xnview.ini",@AppDataDir & "\XnView\",9)
FileCopy("default.bar",@AppDataDir & "\XnView\",9)
;##########
;设置文件关联
Run(@ProgramFilesDir & "\xnview\xnview.exe")
WinWaitActive("XnView","")
Send("!to")
WinWaitActive("选项","")
ControlCommand("选项","","","SelectString",'关联')
ControlClick("选项","","","left",1)
ControlClick("选项","","","left",1)
WinWaitActive("XnView","")
Send("^q")
WinWaitClose("XnView","")
;############
页:
[1]