用什么软件把程序打包成SETUP文件???

用什么软件把程序打包成SETUP文件???,第1张

用Wise Installation 简单好用,特别对于小软件来讲,它带有个向导。

如果软件安装大世没有什么特殊的要求,您可以做个一个干净的系统 把软件都装好 作成GHOST镜像 然后刻盘 以后取每个地方把盘放进光驱 等待就OK了

做个维护工作的朋友一定会在安装完系统后,还要打一大堆补丁,还要装一大堆软件头疼,习公也经常遇到这种心烦事。特地上网查了下资料,终于解决了这个问题。

一、 Microsoft Windows Installer

如果某个软件是用Windows Installer打包的,那你就应该能在文件夹中看到*.msi文件。雹前

这是最典型的特征,这些文件通常可以使用 /QB和 /QN参数进行自动安装。。

/qb 会在窗口中显示一个基本的安装进程

/qn 参数则不会显示任何窗口,直接在后台自动安装

为了阻止某些程序安装成功后自动重启动(例如Kerio Personal Firewall 4),你可以在 /qn 或者 /qb参数后使用REBOOT=Suppress标记,例如:

如安装虚拟光驱 DaemonTools:msiexec /i dtools.msi /qb REBOOT=SUPPRESS

二、 Windows 补丁包

有两种情况,一种是类似IE增量补丁包的那种安装文件,要使之静默安装,只需要在执行文件后加上 /q:a /r:n 参数即可;一种是 Windows 常用的补丁文件,一般情源仿清况下加上 /U /N /Z 即可实现静默安装。

(对于新的系统补丁,也可使用 /passive /norestart)。这通用大部分情况,但某些特定的补丁不能用此法进行静默安装。

三、InstallShield

a.要使用静默安装的方式安装用InstallShield技术打包的程序,首先要在现有的 *** 作系统中创建一个setup.iss文件。

在命令行窗口中使用 -R 参数(大小写敏感)运行安装程序。

例如:Setup.exe -R

b. 接着会显示常见的安装屏幕,并且询问你一些问题,例如要安装的目录等有一点是很重要的,在安装结束后你不能选择“立刻重启动计算机”的选项。如果你选了,在批处理文件中的其他命令就会因为计算机重启动而无法执行。

c. 在安装程序运行完毕后,打开你的C:Windows(或者C:WINNT)目录,然后找到setup.iss文件,把这个文件和你将要静默安装的程序setup.exe保存在同一个目录中

d. 用以下命令进行静默安装:setup.exe -s [-sms]

我怎么知道哪个程序是使用InstallShield技术打包的?

大部分这类程序的安装文件都可以被压缩软件解压缩,安装文件setup.exe的属性对话框中应该有“InstallShield (R) Setup Launcher”或者其他类似的字样。

最后,如果你在保存安装文件的文件夹中看到了一个setup.iss文件,那么毫无疑问这是用InstallShield打包了!

四、InstallShield with MSI

InstallShield with MSI 制作的安装文件,请使用类似:setup.exe /s /v"/qb" 来安装

你的问题:

都仔细看了,有些还是不太懂

例如:DaemonTools:msiexec /i dtools.msi /qb REBOOT=SUPPRESS

为什么要用 msiexec /i ?

还有请问,你测试安装的时候是在虚拟机装还是直接在系统用检测安装装?

答:msiexec是 Windows Installer的一部分。用来帮助Windows Installer package files (MSI)格式的安装文件。

语法:msiexec /i "文件完整路径"

更多Windows Installer参数参看

http://support.microsoft.com/default.aspx?scid=kben-us314881

测试安装,我都试在虚拟机上做的。

反正拿到一个安装程序,大家用各静默安装参数试试就知道了([/s] [/S] [/silent [/noreboot]] [/verysilent [/sp-] [/norestart]] [/q] [/qn] [/qb] [REBOOT=SUPPRESS] [/s /v/qn] [/q:a /r:n] [/u /n /z] [/quiet] [/SilentInstallNoSponsor] [/SilentInstall] [/s /qn] [/s /qd] [-s] [-q] 等)。

无人值守安装光盘最有魅力的地方之一

就是在安装过程中可以静默安装好预先设计集成的一些常用软件,安装结束以后软件就已经可以使用

但是很多朋友发现每个软件以及系统补丁,它们的静默安装参数是不一样的

在本文就和广大爱好者一起研究一下几种常见软件封包形式的静默安装方式

如有遗漏和错误之处,请指出,大家互相交流!

常用的软件封包形式主要有以下几个形式

Inno Setup

InstallShield

NSIS

Microsoft Windows Installer

WISE

QUOTE:

一.Inno Setup

使用Inno技术制成的程序安装包可以使用/SILENT 和 /VERYSILENT参数进行静默安装

我不知道这两个参数有什么分别,因为它们实现的功能看上去是一样的

setup.exe /VERYSILENT

你会看到一个对话框,询问你是否打算继续安装:

我们可以通过使用一个参数跳过这个对话框:

setup.exe /VERYSILENT /SP-

有些利用Inno 技术做作的安装包会在程序安装完毕后自动运行所安装的程序,例如ISOBuster

不过我们可以使用一个叫做Taskkill的系统自带工具杀死相关的进程。

以下是一个可以用于批处理文件安装由Inno打包的软件的命令的示例:

ECHO.

ECHO 正在安装ISOBuster 1.4

ECHO 请稍候...

start /wait %systemdrive%installApplicationsISOBusterIsoBuster14.exe /VERYSILENT /SP-

ECHO.

ECHO Killing ISOBuster.exe process

taskkill.exe /F /IM isobuster.exe

ECHO.

我怎么知道哪个安装程序是用Inno 技术打包的?

这种软件安装时第一个界面一般如下图所示

在窗口标题栏左侧的图标上点击鼠标左键

然后再探出菜单上点击“About Setup”也可以看见安装类型

更多使用Inno技术打包的软件可用的参数可以在下面看到:

E文好的朋友可以仔细研究研究

With the Inno Setup Extentions in use the following command line switches become available:

SP-

Disables the This will install... Do you wish to continue? prompt at the beginning of Setup. Of course, this will have no

effect if the DisableStartupPrompt [Setup] section directive was set to yes.

/SILENT, /VERYSILENT

Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but

the installation progress window is. When a setup is very silent this installation progress window is not displayed.

Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you

haven''t disabled it with DisableStartupPrompt or the ''/SP-'' command line option explained above)

If a restart is necessary and the ''/NORESTART'' command isn''t used (see below) and Setup is silent, it will display a

Reboot now? messagebox. If it''s very silent it will reboot without asking.

/NORESTART

Instructs Setup not to reboot even if it''s necessary.

/LOADINF="filename"

Instructs Setup to load the settings from the specified file after having checked the command line. This file can be prepared

using the ''/SAVEINF='' command as explained below.

/SAVEINF="filename"

Instructs Setup to save installation settings to the specified file.

/DIR="x:dirname"

Overrides the default directory name displayed on the Select Destination Directory wizard page. A fully qualified pathname

must be specified. If the [Setup] section directive DisableDirPage was set to yes, this command line parameter is ignored.

/GROUP="folder name"

Overrides the default folder name displayed on the Select Start Menu Folder wizard page. If the [Setup] section directive

DisableProgramGroupPage was set to yes, this command line parameter is ignored.

/NOICONS

Instructs Setup to initially disable the Don''t create any icons check box on the Select Start Menu Folder wizard page.

/COMPONENTS="comma separated list of component names"

Overrides the default components settings. Using this command line parameter causes Setup to automatically select a custom

type.

QUOTE:

二.InstallShield

要使用静默安装的方式安装用InstallShield技术打包的程序

你首先要在现有的 *** 作系统中创建一个setup.iss文件。

1. 在命令行窗口中使用 -R 参数(大小写敏感)运行安装程序。

例如:

Setup.exe -R

2. 接着会显示常见的安装屏幕,并且询问你一些问题,例如要安装的目录等

有一点是很重要的,在安装结束后你不能选择“立刻重启动计算机”的选项

如果你选了,在批处理文件中的其他命令就会因为计算机重启动而无法执行

3. 在安装程序运行完毕后,打开你的C:Windows (或者C:WINNT)目录

然后找到setup.iss文件,把这个文件和你将要静默安装的程序setup.exe保存在同一个目录中

4. 用以下命令进行静默安装:

start /wait %systemdrive%installApplicationApplication_nameSetup.exe -s

5. 对所有准备进行静默安装,并且使用了InstallShield技术打包的程序重复上面的步骤 *** 作

技术难点:从光盘上的RunOnceEx中安装用Installshield技术打包的程序

如果从光盘上直接执行RunOnceEx,用Installshield打包的应用程序安装将会失败

除非你指定了用于保存日至文件的位置

下面就有一个示例,你可以将这个例子用于你自己的程序的安装(粗体字部分看仔细了):

REG ADD %KEY%45 /VE /D "Kerio Personal Firewall 2.1.5" /f

REG ADD %KEY%45 /V 1 /D "%CDROM%appsKPFSetup.exe -s -f2"%systemdrive%kerio.log"" /f

然后你可以用一个cleanup.cmd文件删除kerio.log文件

DEL "%systemroot%kerio.log"

我怎么知道哪个程序是使用InstallShield技术打包的?

大部分这类程序的安装文件都可以被压缩软件解压缩,安装文件setup.exe的属性对话框中应该有“InstallShield (R) Setup Launcher”或者

其他类似的字样。

最后,如果你在保存安装文件的文件夹中看到了一个setup.iss文件,

那么毫无疑问这是用InstallShield打包了!

QUOTE:

三. Nullsoft SuperPiMP Install System (NSIS)

使用NSIS 打包的安装文件可以用 /S参数进行自动安装(“S”是大小写敏感的):

Setup.exe /S

你也可以用 /D参数选择将要安装的目标分区和文件夹:

Setup.exe /S /D=E:SoftwareCDex

像Winamp 和CDex这类的软件都会在安装结束后显示一个确认屏幕(CDex)

或者一个设置文件关联方式的结束安装屏幕(Winamp)

我还不知道怎样跳过这一步,但是这个屏幕对批处理文件的继续执行不会有任何影响

我怎么知道哪个程序是使用NSIS技术打包的?

很多用NSIS打包的程序在安装的时候都有类似这样的窗口,例如Winamp 和CDex:

QUOTE:

四.Microsoft Windows Installer

微软老大的封包形式!

如果某个软件是用Windows Installer打包的,那你就应该能在文件夹中看到*.msi文件。

这是最典型的特征

这些文件通常可以使用 /QB和 /QN参数进行自动安装。

Powertoys使用了 /s /v/qn参数,对于这些软件,你可以依次尝试上面提到的参数

看看哪个是有效的。

/qb 会在窗口中显示一个基本的安装进程

/qn 参数则不会显示任何窗口,直接在后台自动安装

阻止程序安装完成后自动重启动:

为了阻止某些程序安装成功后自动重启动(例如Kerio Personal Firewall 4),你可以在 /qn 或者 /qb参数后使用REBOOT=Suppress标记,例

如:

setup.msi "/qn REBOOT=Suppress"

有些安装程序使用 /s/v/qn参数进行自动安装,因此阻止它们重启动应该用:

setup.exe /s /v"/qn REBOOT=Suppress"

QUOTE:

五.WISE Installer

用WISE技术打包的软件在安装的时候可以选择使用 /s参数进行自动安装:

Setup.exe /s

更多的其他参数:

You can run Wise Installation .EXE with command line options to automate many of the tasks you would normally do in the User

Interface. The list of options is as follows.

/c file.wse -- creates executable file from wise script

/r -- opens Wise in SetupCapture window

/u -- runs the upgrade wizard that checks for any upgrades online

/d CompVar=Value -- defines a single compiler variable in Enterprise Edition. Multiple definitions require multiple /d

/d=filename -- uses filename to define compiler variables. Each line in file is CompVar=Value

Example: installbuilder.exe /c /d _MYVAR_="Test" c:mysourcefilessetup.wse

Wise Installations:

/T -- test mode

/X pathname -- extracts files into pathname

/Z pathname -- extracts files into pathname and reboots

/S -- silent install

/M -- prompts for windows, system, temp directories

/M=filename -- specifies a value file similar to /d above, but for standard variables (See NOTE below).

/M1 -- same as /m plus it prompts before any file that is self-registered

/M2 -- reserved for internal use by Wise during debugger sessions

Example: setup.exe /T

Unwise:

/Z -- remove empty directories, including one with unwise itself in it.

/A -- automatic mode, no user choices other than cancel.

/S -- silent mode, automatic mode with no user choices

/R -- rollback mode, selects option to rollback on uninstall

/U -- like automatic mode, but gives all choices other than custom/automatic title window title can be at the end of the

command line

Example: unwise.exe /S c:myprogramdirectoryinstall.log

NOTE: The values file is a simple text file with variables listed, one per line, in VARIABLE="VALUE" format. If the variable

is found in the values file, the specified value is usedotherwise, its value is unchanged. The file containing the

variables can be up to 32K.

我怎么知道哪些程序是使用Wise技术打包的?

使用Wise技术打包的大部分程序都会在开始运行的时候显示一个启动界面:

但是也有一些会最小化这个窗口,只显示一个深蓝色的背景,还有安装窗口在屏幕的中央

基本介绍完毕

有人问?绿色软件怎么安装啊?

告诉大家:用RAR做个自解压,这个方法好像是最简单有效的,呵呵

http://hi.baidu.com/royfantasy/blog/item/9806ce33d5a23743ad4b5fbd.html

有点复杂啊。。。这么短讲不清楚。。。我写的仅供参考,以R官网的说法为准。

一般先点右上角新建一个project(一般悄茄是new directory),类型是package,其他设置看自己喜好啦。然后要填写DESCRIPTION,比如作者、概述、包的版本、license、依赖哪些包、建议同时装哪些包……函数如果卜运轮都是用R语言写的话(没有用C/C++/Fortran/……来实现部分功能),就把.R文件都放到R目录底下。帮助文档(就是可以用help(function)调出来的文档)我比较建议用roxygen2包来做,直接在.R文件里按照特定的格式写文档(去这个包的网站看一下格式),然后在包的目录底下在R里运行roxygen2::roxygenize(),就直接把文档写到man目录下了,顺便NAMESPACE也一块儿自动写了,之后要改文档的话重新运行就行了。

其他方面:vignnettes之类的文档去网上找吧(考虑一下用好一点的搜索引擎o(╯□╰)o),这方面有一大堆东西可以写,当然也可以不写。还可以在包里自带数据集:把数据放在data目录下,关于数据的文档也可以在.R文件里写然后roxygenize。如果要用其他语言实现部分功能的话,去R的官网看怎么弄吧,我没用过这么高级的功能o(╯□╰)o。我还看到网上说有个叫packrat的东西可以用,好像是把依赖的包一起打包进新的包里。我没用过。

全部写好之型信后最好测试一下,比如在自己电脑里装上这个包试试,还可以在cmd/shell里运行R CMD check path/to/package/directory自动测试这个包(貌似windows系统下要装Rtools还要调一下系统的路径才能这么用,自己找一下吧)。

总之不是一篇回答就能说清楚的o(╯□╰)o,我自己也是花了好长时间在网上搜才把之前的包搞定的。

另外,作为一个project,可以考虑用一些版本控制的软件来帮忙,比如git、svn。用git的话可以直接放到github上面,别人就可以直接用devtools包里的函数装啦~如果想传到CRAN或者Bioconductor的话,对包的功能、稳定性、文档等的要求会比较高,我从没想过弄这些。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12432556.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存