我正在编写一个脚本,要求用户选择要安装的应用程序的哪些部分:
仅限应用程序,仅限DataBase Engine,仅限数据或这些的任意组合.
我知道我应该使用该[Components]部分来定义这些,但我对类型,组件和任务之间的相互作用感到困惑 - 首先,我认为[Tasks]是"额外"安装,但后来我看到了明确链接三者的代码.
谁能指点我对这些如何协同工作的一个很好的解释? - 我相信有一个......
谢谢
我在Inno Setup中有以下代码.
但是如何将这个类似的函数应用于.msi文件呢?
msiexec /I "\package\file.msi" /qb?怎么样?
procedure AfterMyProgInstall(S: String);
var
ErrorCode: Integer;
begin
{MsgBox('Please wait the libraries are getting installed, ' +
'without the libraries it wont work.', mbInformation, MB_OK);}
ExtractTemporaryFile(S);
{SW_SHOW, SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE, SW_HIDE}
ShellExec('', ExpandConstant('{app}\package\' + S), '', '', SW_SHOWNORMAL,
ewWaitUntilTerminated, ErrorCode);
end;
Run Code Online (Sandbox Code Playgroud) 我想从unix系统获取一个文件到我的本地系统,这是在Windows上使用java.我对这个概念非常陌生.关于如何做到的任何想法?哪个是最适合此任务的Java API?
我必须从SFTP位置下载一些文件.
我正在使用这些SharpSsh库,但我无法连接.
以下是我的SFTP详细信息:
<add key="FTPHost" value="xyz.csod.com" />
<add key="FTPDirectory" value="/Test" />
<add key="FTPUserName" value="abc" />
<add key="FTPPassword" value="pass" />
<add key="FTPPort" value="22" />
Run Code Online (Sandbox Code Playgroud)
下面是与SFTP连接的c#代码:
using Tamir.SharpSsh;
using Tamir.SharpSsh.jsch;
using Tamir.Streams;
public string DownloadFile()
{
Sftp oSftp = new Sftp(host, userName, password);//
oSftp.Connect(port);
}
Run Code Online (Sandbox Code Playgroud)
但我在Connect()时遇到异常.是 -
附加信息:
System.Net.Sockets.SocketException(0x80004005):请求的名称有效,但未找到所请求类型的数据
位于Tamir.SharpSsh的Tamir.SharpSsh.java.net.Socket..ctor(String host,Int32 port)的System.Net.Dns.GetHostByName(String hostName)的System.Net.Dns.InternalGetHostByName(String hostName,Boolean includeIPv6) .jsch.Util.createSocket(String host,Int32 port,Int32 timeout)"
我正在使用C#控制台应用程序.
我正在使用JSch 0.1.50为我的CI Jenkins插件建立与远程服务器的连接.让我们假设我在这里使用session.connect(60000);超时60秒:
Session session = null;
try {
JSch jsch = new JSch();
if (rsaIdentity != null && !rsaIdentity.equals("")) {
jsch.addIdentity(rsaIdentity.trim());
}
session = jsch.getSession(serverLogin, serverHost, Integer.parseInt(serverPort));
session.setPassword(getDescriptor().getOpenPassword(encryptedPasswordString));
session.setConfig("StrictHostKeyChecking", "no"); // not use RSA key
int timeOut = Integer.parseInt(getDescriptor().getConnectionTimeOut());
session.connect(60000);
} catch (SocketTimeoutException e) {
logger.error(e.getMessage());
return false;
} catch (JSchException e) {
logger.error(e.getMessage());
return false;
}
Run Code Online (Sandbox Code Playgroud)
但实际上在连接到相当慢的服务器期间执行此代码期间,我Exception每次都会在大约20秒内面临超时:
2016-01-25 13:15:55.982 [INFO] Connecting to server: devsrv26:22 as [user] ...
2016-01-25 13:16:16.991 [ERROR] java.net.ConnectException: Connection timed out: …Run Code Online (Sandbox Code Playgroud) 在Inno Setup Pascal脚本中将布尔值转换为String的最简单方法是什么?应该完全隐含的这个微不足道的任务似乎需要一个完整的if/ else构造.
function IsDowngradeUninstall: Boolean;
begin
Result := IsCommandLineParamSet('downgrade');
MsgBox('IsDowngradeUninstall = ' + Result, mbInformation, MB_OK);
end;
Run Code Online (Sandbox Code Playgroud)
这不起作用,因为"类型不匹配".IntToStr不接受Boolean.BoolToStr不存在.
我实现了一个Java程序,该程序将使用JSCH在远程服务器中连接并执行命令。问题是,每当我尝试连接到服务器时,都会出现以下异常:
com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 256 to 2048 (inclusive)
Run Code Online (Sandbox Code Playgroud)
我尝试了在jre / lib和security.provider中添加Bouncy Castle提供程序的解决方案,它可以正常工作。但是我需要使其依赖于项目,因此我尝试在构建路径中添加Bouncy Castle,并在程序中手动添加Bouncy Castle提供程序。但是将其导出到jar后,我仍然收到异常。
package services;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.security.Security;
import java.util.Iterator;
import java.util.Properties;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
public class MainService {
public MainService() {
Security.addProvider(new BouncyCastleProvider()); //Adding BouncyCastlePRovider in security
// TODO Auto-generated constructor stub
String report = "";
StringBuilder sb = new StringBuilder();
System.out.println("Running the monitoring...");
System.out.println("Starting printer monitoring...");
PrinterService ps = …Run Code Online (Sandbox Code Playgroud) 我py2exe使用Windows 7上的Inno Setup 创建我的应用程序并将其打包到安装程序exe中.然后可以在Windows 7和Windows 10系统上安装以这种方式创建的安装程序.当它工作时,安装程序按顺序显示以下屏幕:
这是Inno Setup 5.5.5或更低版本的行为.
使用Inno Setup 5.5.7及更高版本(未尝试5.5.6),安装程序正常创建,可以在Windows 7上进行如上设置.但是,相同的安装程序在安装过程中无法从上面的列表中显示屏幕1和3 Windows 10:安装程序直接从EULA屏幕开始,然后跳转到确认安装位置.确认屏幕甚至不显示安装将在哪个目录中完成.
继续允许安装在默认位置进行,并且应用程序正常工作.不知道安装位置是非常烦人和不受欢迎的.
.iss我使用的文件(见下文)在我尝试过的不同Inno Setup版本中是相同的.在文件中,DefaultDirName显式设置(基于应用程序的版本).
; WARNING: This script has been created by py2exe. Changes to this script
; will be overwritten the next time py2exe is run!
[Setup]
AppName=MyApp
AppVersion=2.0.1
AppVerName=MyApp 2.0.1
AppPublisher=Company, Inc.
AppPublisherURL=www.company.com
AppContact=support@company.com
AppCopyright=Copyright (C) 2010-2016, Company, Inc.
LicenseFile=license\MyAppEULA.rtf
SetupIconFile=icons\CompanyScreeningProgram.ico
WizardImageFile=icons\MyAppImage.bmp
WizardSmallImageFile=icons\MyAppSmallImage.bmp
DefaultDirName=C:\MyApp_v2.0.1
DefaultGroupName=MyApp
Compression=lzma
OutputDir=F:\Python\dist\
OutputBaseFilename=MyApp_2.0.1_Setup
[Files]
Source: …Run Code Online (Sandbox Code Playgroud)