我用Inno Setup 制作安装包,基本的会点,脚本也会一点 现在想要达到的效果是这样一个
双击这个安装包,在桌面上写一个 快捷方式 这个快捷方式指向的是 D:\software\my.exe
但是双击后不能有任何的窗口出现 请问这个如何实现呢
双击这个安装包,在桌面上写一个 快捷方式 这个快捷方式指向的是 D:\software\my.exe
但是双击后不能有任何的窗口出现 请问这个如何实现呢
解决方案 »
- opengl如何绘制物体到纹理上
- error C2440: “初始化”: 无法从“char”转换为“ATL::CStringT<BaseType,StringTraits>”
- 利用Cfile删除文件 remove 有时删不掉
- VS2005做手机短信购票软件
- 如何在单文档中给对话框添加视图?
- 询问一个软件的原理,小弟没分了,请原谅
- typedef unsigned (__stdcall *PTHREAD_START)(void*) 是什么意思
- 使用DCOM怎么在客户端取得服务器端的结果集?(非常急)
- 模板类的问题
- MFC的一个简单的问题(来者有分)
- VS2008添加CWgraph控件
- 多线程扫描文件卡死,求解
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES![Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
VersionInfoVersion=0.2.09
VersionInfoTextVersion=0.1.09AppId={{5CD8EBE5-3A11-4468-907D-1F4B6FD52757}
AppName=HywayEditor@Hyway
AppVerName=HywayEditor 0.2.09
AppPublisher=Hyway
AppSupportURL=http://www.snjp.co.jp/
AppCopyright=Copyright(C)2007-2010 Sino-Japanese Engineering Corp.
;default HywayEditor install dir
DefaultDirName={pf}\Hyway\HywayEditor@Hyway
;default start menu dir
DefaultGroupName=Hyway\HywayEditor@Hyway
AllowNoIcons=yes
AllowRootDirectory=yes
AlwaysUsePersonalGroup=yes
AlwaysShowDirOnReadyPage=yes
ChangesAssociations=yes
;PrivilegesRequired=none
AppMutex=sinojpVisualEditor
;output the setup file
OutputDir=.
OutputBaseFilename=HywayEditor_Setup_0.2.09
LicenseFile=license.txt
SetupIconFile=image\main.ico
;UninstallDisplayIcon
;UninstallDisplayName
WizardImageFile=image\welcome_left.bmp
WizardSmallImageFile=image\top_right.bmp
Compression=lzma
SolidCompression=yes[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "japanese"; MessagesFile: "compiler:\Languages\Japanese.isl"
Name: "chinesesimple"; MessagesFile: "compiler:\Languages\ChineseSimple.isl"
[Tasks]
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: uncheckedName: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: desktopicon\common; Description: "For all users"; GroupDescription: "Additional icons:"; Flags: exclusive
Name: desktopicon\user; Description: "For the current user only"; GroupDescription: "Additional icons:"; Flags: exclusive unchecked[Files]
Source: "ve_program\HywayEditor.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "ve_program\VEConfig.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "ve_program\properties\*"; DestDir: "{app}\properties"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "msxml6sp2_en.msi"; DestDir: "{app}"; Flags: ignoreversion deleteafterinstall
Source: "install\Release\install.exe"; DestDir: "{app}"; Flags: ignoreversion deleteafterinstall
; NOTE: Don't use "Flags: ignoreversion" on any shared system files[dirs]
Name: "{app}\lib"
Name: "{app}\projects"[Icons]
Name: "{group}\HywayEditor@Hyway"; Filename: "{app}\HywayEditor.exe"
; Tasks: startmenu
Name: "{group}\{cm:ProgramOnTheWeb,HywayEditor}"; Filename: "http://www.snjp.co.jp/"
Name: "{group}\{cm:UninstallProgram,HywayEditor}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\HywayEditor@Hyway"; Filename: "{app}\HywayEditor.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\HywayEditor@Hyway"; Filename: "{app}\HywayEditor.exe"; Tasks: quicklaunchicon[Run]
Filename: "{app}\install.exe"; WorkingDir: "{app}"; Flags: hidewizard waituntilterminated
Filename: "{app}\HywayEditor.exe"; Description: "{cm:LaunchProgram,HywayEditor@Hyway}"; Flags: nowait postinstall skipifsilent[Registry]
Root: HKCU; Subkey: "Software\Hyway"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\Hyway\HywayEditor"; Flags: deletekey uninsdeletekey
Root: HKCR; Subkey: ".hyp"; Flags: deletekey uninsdeletekey
Root: HKCR; Subkey: "hypfile"; Flags: deletekey uninsdeletekey
-------------------------------------------------------------------
例子可以参考上面的,修改成符合自己的脚本文件
能满足你的要求,不用写脚本。
[Setup]
DisableStartupPrompt=yes
UseSetupLdr=yes
Appname="test"
AppverName="V1.1"
DefaultdirName="d:\software"
[files]
source:"my.exe"; DestDir: "{app}"
[Icons]
Name: "{userdesktop}\"; Filename: "{app}\my.EXE";
如果要不能有任何的窗口出现 ,只能再建一批处理来运行它:
setup.exe /VERYSILENT /SP-
这样.什么提示都没有,就会在桌面上建一个快捷方式,并指向d:\software\my.exe直接在程序中的,没找到更好的方法
Below is a list of all the wizard pages Setup may potentially display, and the conditions under which they are displayed.Welcome
Always shown.
....
我把其它的FROM都禁用了,唯一不能禁用Welcome FROM
DisableStartupPrompt=yes
UseSetupLdr=yes
DisableProgramGroupPage=yes
DisableDirPage=yes
DisableReadyPage=yes
DisableFinishedPage=yes
DisableReadyMemo=yes
WindowVisible=no
看来这个真的不行
你看到的有些插件,可能不是由inno生成的.因为除了inno,还有很多打包程序,你自己可写一个.
;其他自行设置
;
Uninstallable=false//不要卸载
DirExistsWarning=no
DisableDirPage=yes
DisableFinishedPage= yes
DisableProgramGroupPage=yes
DisableReadyMemo=yes
DisableReadyPage=yes
DisableStartupPrompt=yes[Files]
Source: xxx; DestDir: {app}; Flags: ignoreversion[Icons]
;自行添加快捷方式
Name: {commondesktop}\xxx; Filename: {app}\xxx.exe;[Code]
procedure CurPageChanged(CurPageID: Integer);
begin
//将就下吧,貌似无法隐藏这个WizardForm
WizardForm.Left:=-100;
WizardForm.Top :=-100;
WizardForm.Width:=0;
WizardForm.Height :=0;
WizardForm.Visible:=False//无效
WizardForm.Hide//无效
MainForm.Hide//无效
//ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), SW_HIDE);//无效,和SPY++的句柄一样的了
//ShowWindow(WizardForm.Handle, SW_HIDE);//无效,和SPY++的句柄一样的了
//SendMessage SW_SHOWWINDOW一样无效
MainForm.Visible:=False
WizardForm.NextButton.OnClick(WizardForm);//自动点下一步
end;function ShouldSkipPage ( PageID : Integer): Boolean;
begin
Result := true//跳过向导页
end;
这种情况下,安装程序会停在后台,安装就停在那里了,安装不能结束。
我用的是5.4.2
没有实际达到静默的效果。
Inno Setup内部禁止完全的静默,号称为了防止别人用来给系统偷偷地装东西。