我正在写一个Inno Setup安装程序,它要求我做一些命令提示工作。我需要导航到一个目录,使用参数'setupDecompWorkspace'调用批处理文件,然后我希望能够看到它运行。
我目前正在这样做:
[Run]
Filename:"E:\Project\forge_src\gradlew.bat";Parameters:"/setupDecompWorkspace"
然而,这是行不通的。在这个命令之后,我需要用另一个参数再次运行同一个批处理文件。作为一种新方法,我尝试构建自己的批处理文件,完成所有这些操作。当我从我的文件夹运行该批处理文件时,它工作正常,但Inno Setup提供退出代码为1并拒绝启动。这样做我用的是:
[Run]
Filename: "E:\Project\forge_src\gradle.bat";
有人能指出我正在做错的方向吗?我已经能够在命令提示符下成功完成,也可以通过执行我自己的批处理文件,但Inno Setup中的任何实现都给我带来了麻烦。
这是完整的程序:
#define MyAppName "Project"
#define MyAppVersion "1.0"
#define MyAppPublisher "Project"
#define MyAppURL "http://www.project.com/"
#define MyAppExeName "project.exe"
[Setup]
AppId={{0E56B9DD-F0FE-400D-9BB3-9082C5ECD73B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
PrivilegesRequired = admin
SetupLogging = yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "E:\Project\*.*"; DestDir: "C:\Program Files (x86)\Project"; Flags: recursesubdirs
[Run]
Filename: "E:\Project\installers\gradle.bat";
这是它正在创建的日志文件:
2015-04-16 12:55:55.681 Log opened. (Time zone: UTC-07:00)
2015-04-16 12:55:55.681 Setup version: Inno Setup version 5.5.5 (a)
2015-04-16 12:55:55.682 Original Setup EXE: E:\Project\installers\Output\setup.exe
2015-04-16 12:55:55.683 Setup command line: /SL5="$20498,262866,56832,E:\Project\installers\Output\setup.exe" /SPAWNWND=$10496 /NOTIFYWND=$1048A /DEBUGWND=$10474
2015-04-16 12:55:55.684 Windows version: 6.1.7601 SP1 (NT platform: Yes)
2015-04-16 12:55:55.685 64-bit Windows: Yes
2015-04-16 12:55:55.686 Processor architecture: x64
2015-04-16 12:55:55.686 User privileges: Administrative
2015-04-16 12:55:55.689 64-bit install mode: No
2015-04-16 12:55:55.694 Created temporary directory: C:\Users\Laptop\AppData\Local\Temp\is-N6J75.tmp
2015-04-16 12:56:04.483 Starting the installation process.
2015-04-16 12:56:04.487 Creating directory: C:\Program Files (x86)\Project
2015-04-16 12:56:04.489 Directory for uninstall files: C:\Program Files (x86)\Project
2015-04-16 12:56:04.491 Creating new uninstall log: C:\Program Files (x86)\Project\unins000.dat
2015-04-16 12:56:04.500 -- File entry --
2015-04-16 12:56:04.502 Dest filename: C:\Program Files (x86)\Project\unins000.exe
2015-04-16 12:56:04.508 Time stamp of our file: 2015-04-16 12:55:55.588
2015-04-16 12:56:04.510 Installing the file.
2015-04-16 12:56:04.517 Uninstaller requires administrator: Yes
2015-04-16 12:56:04.558 Successfully installed the file.
2015-04-16 12:56:04.560 -- File entry --
2015-04-16 12:56:04.564 Dest filename: C:\Program Files (x86)\Project\forge_src\build.gradle
2015-04-16 12:56:04.566 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.567 Installing the file.
2015-04-16 12:56:04.568 Creating directory: C:\Program Files (x86)\Project\forge_src
2015-04-16 12:56:04.586 Successfully installed the file.
2015-04-16 12:56:04.587 -- File entry --
2015-04-16 12:56:04.589 Dest filename: C:\Program Files (x86)\Project\forge_src\CREDITS-fml.txt
2015-04-16 12:56:04.591 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.592 Installing the file.
2015-04-16 12:56:04.605 Successfully installed the file.
2015-04-16 12:56:04.608 -- File entry --
2015-04-16 12:56:04.609 Dest filename: C:\Program Files (x86)\Project\forge_src\forge-1.7.10-10.13.2.1230-changelog.txt
2015-04-16 12:56:04.611 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.612 Installing the file.
2015-04-16 12:56:04.636 Successfully installed the file.
2015-04-16 12:56:04.637 -- File entry --
2015-04-16 12:56:04.639 Dest filename: C:\Program Files (x86)\Project\forge_src\gradlew
2015-04-16 12:56:04.641 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.642 Installing the file.
2015-04-16 12:56:04.652 Successfully installed the file.
2015-04-16 12:56:04.653 -- File entry --
2015-04-16 12:56:04.655 Dest filename: C:\Program Files (x86)\Project\forge_src\gradlew.bat
2015-04-16 12:56:04.657 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:04.658 Installing the file.
2015-04-16 12:56:04.667 Successfully installed the file.
2015-04-16 12:56:04.669 -- File entry --
2015-04-16 12:56:04.670 Dest filename: C:\Program Files (x86)\Project\forge_src\LICENSE-fml.txt
2015-04-16 12:56:04.671 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:04.673 Installing the file.
2015-04-16 12:56:04.684 Successfully installed the file.
2015-04-16 12:56:04.686 -- File entry --
2015-04-16 12:56:04.688 Dest filename: C:\Program Files (x86)\Project\forge_src\MinecraftForge-Credits.txt
2015-04-16 12:56:04.689 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:04.690 Installing the file.
2015-04-16 12:56:04.701 Successfully installed the file.
2015-04-16 12:56:04.702 -- File entry --
2015-04-16 12:56:04.704 Dest filename: C:\Program Files (x86)\Project\forge_src\MinecraftForge-License.txt
2015-04-16 12:56:04.705 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:04.707 Installing the file.
2015-04-16 12:56:04.717 Successfully installed the file.
2015-04-16 12:56:04.720 -- File entry --
2015-04-16 12:56:04.721 Dest filename: C:\Program Files (x86)\Project\forge_src\README.txt
2015-04-16 12:56:04.723 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:04.724 Installing the file.
2015-04-16 12:56:04.732 Successfully installed the file.
2015-04-16 12:56:04.734 -- File entry --
2015-04-16 12:56:04.735 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\gradle.log
2015-04-16 12:56:04.737 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.738 Installing the file.
2015-04-16 12:56:04.739 Creating directory: C:\Program Files (x86)\Project\forge_src\.gradle
2015-04-16 12:56:04.746 Successfully installed the file.
2015-04-16 12:56:04.748 -- File entry --
2015-04-16 12:56:04.749 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts\cache.properties
2015-04-16 12:56:04.751 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.752 Installing the file.
2015-04-16 12:56:04.753 Creating directory: C:\Program Files (x86)\Project\forge_src\.gradle\2.0
2015-04-16 12:56:04.754 Creating directory: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts
2015-04-16 12:56:04.764 Successfully installed the file.
2015-04-16 12:56:04.766 -- File entry --
2015-04-16 12:56:04.768 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts\cache.properties.lock
2015-04-16 12:56:04.769 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.770 Installing the file.
2015-04-16 12:56:04.779 Successfully installed the file.
2015-04-16 12:56:04.780 -- File entry --
2015-04-16 12:56:04.782 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts\fileHashes.bin
2015-04-16 12:56:04.783 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.784 Installing the file.
2015-04-16 12:56:04.797 Successfully installed the file.
2015-04-16 12:56:04.798 -- File entry --
2015-04-16 12:56:04.800 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts\fileSnapshots.bin
2015-04-16 12:56:04.801 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.802 Installing the file.
2015-04-16 12:56:04.815 Successfully installed the file.
2015-04-16 12:56:04.817 -- File entry --
2015-04-16 12:56:04.819 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts\outputFileStates.bin
2015-04-16 12:56:04.820 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.822 Installing the file.
2015-04-16 12:56:04.837 Successfully installed the file.
2015-04-16 12:56:04.840 -- File entry --
2015-04-16 12:56:04.842 Dest filename: C:\Program Files (x86)\Project\forge_src\.gradle\2.0\taskArtifacts\taskArtifacts.bin
2015-04-16 12:56:04.843 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.845 Installing the file.
2015-04-16 12:56:04.855 Successfully installed the file.
2015-04-16 12:56:04.858 -- File entry --
2015-04-16 12:56:04.860 Dest filename: C:\Program Files (x86)\Project\forge_src\build\.gitignore
2015-04-16 12:56:04.861 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.863 Installing the file.
2015-04-16 12:56:04.865 Creating directory: C:\Program Files (x86)\Project\forge_src\build
2015-04-16 12:56:04.875 Successfully installed the file.
2015-04-16 12:56:04.877 -- File entry --
2015-04-16 12:56:04.879 Dest filename: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\GradleStart.java
2015-04-16 12:56:04.881 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.882 Installing the file.
2015-04-16 12:56:04.884 Creating directory: C:\Program Files (x86)\Project\forge_src\build\tmp
2015-04-16 12:56:04.886 Creating directory: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart
2015-04-16 12:56:04.888 Creating directory: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted
2015-04-16 12:56:04.905 Successfully installed the file.
2015-04-16 12:56:04.907 -- File entry --
2015-04-16 12:56:04.910 Dest filename: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\GradleStartServer.java
2015-04-16 12:56:04.911 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.913 Installing the file.
2015-04-16 12:56:04.925 Successfully installed the file.
2015-04-16 12:56:04.927 -- File entry --
2015-04-16 12:56:04.929 Dest filename: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\net\minecraftforge\gradle\GradleStartCommon.java
2015-04-16 12:56:04.931 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.932 Installing the file.
2015-04-16 12:56:04.935 Creating directory: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\net
2015-04-16 12:56:04.937 Creating directory: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\net\minecraftforge
2015-04-16 12:56:04.939 Creating directory: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\net\minecraftforge\gradle
2015-04-16 12:56:04.953 Successfully installed the file.
2015-04-16 12:56:04.955 -- File entry --
2015-04-16 12:56:04.958 Dest filename: C:\Program Files (x86)\Project\forge_src\build\tmp\makeStart\extracted\net\minecraftforge\gradle\OldPropertyMapSerializer.java
2015-04-16 12:56:04.960 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.962 Installing the file.
2015-04-16 12:56:04.976 Successfully installed the file.
2015-04-16 12:56:04.978 -- File entry --
2015-04-16 12:56:04.980 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.resources\.projects\Minecraft\.location
2015-04-16 12:56:04.982 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:04.984 Installing the file.
2015-04-16 12:56:04.985 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse
2015-04-16 12:56:04.987 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata
2015-04-16 12:56:04.989 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins
2015-04-16 12:56:04.991 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.resources
2015-04-16 12:56:04.994 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.resources\.projects
2015-04-16 12:56:04.996 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.resources\.projects\Minecraft
2015-04-16 12:56:05.006 Successfully installed the file.
2015-04-16 12:56:05.009 -- File entry --
2015-04-16 12:56:05.011 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.core.resources.prefs
2015-04-16 12:56:05.013 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.015 Installing the file.
2015-04-16 12:56:05.017 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime
2015-04-16 12:56:05.019 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings
2015-04-16 12:56:05.031 Successfully installed the file.
2015-04-16 12:56:05.033 -- File entry --
2015-04-16 12:56:05.036 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.debug.ui.prefs
2015-04-16 12:56:05.038 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.039 Installing the file.
2015-04-16 12:56:05.052 Successfully installed the file.
2015-04-16 12:56:05.055 -- File entry --
2015-04-16 12:56:05.057 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.epp.usagedata.gathering.prefs
2015-04-16 12:56:05.060 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.061 Installing the file.
2015-04-16 12:56:05.075 Successfully installed the file.
2015-04-16 12:56:05.077 -- File entry --
2015-04-16 12:56:05.079 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.core.prefs
2015-04-16 12:56:05.081 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.082 Installing the file.
2015-04-16 12:56:05.093 Successfully installed the file.
2015-04-16 12:56:05.095 -- File entry --
2015-04-16 12:56:05.097 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.editors.prefs
2015-04-16 12:56:05.098 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.100 Installing the file.
2015-04-16 12:56:05.110 Successfully installed the file.
2015-04-16 12:56:05.112 -- File entry --
2015-04-16 12:56:05.114 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.ide.prefs
2015-04-16 12:56:05.116 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.117 Installing the file.
2015-04-16 12:56:05.137 Successfully installed the file.
2015-04-16 12:56:05.139 -- File entry --
2015-04-16 12:56:05.141 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.prefs
2015-04-16 12:56:05.143 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.144 Installing the file.
2015-04-16 12:56:05.162 Successfully installed the file.
2015-04-16 12:56:05.164 -- File entry --
2015-04-16 12:56:05.166 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.debug.core\.launches\Client.launch
2015-04-16 12:56:05.168 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.169 Installing the file.
2015-04-16 12:56:05.171 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.debug.core
2015-04-16 12:56:05.173 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.debug.core\.launches
2015-04-16 12:56:05.185 Successfully installed the file.
2015-04-16 12:56:05.187 -- File entry --
2015-04-16 12:56:05.189 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.debug.core\.launches\Server.launch
2015-04-16 12:56:05.191 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.193 Installing the file.
2015-04-16 12:56:05.205 Successfully installed the file.
2015-04-16 12:56:05.206 -- File entry --
2015-04-16 12:56:05.210 Dest filename: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.debug.ui\launchConfigurationHistory.xml
2015-04-16 12:56:05.211 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.213 Installing the file.
2015-04-16 12:56:05.214 Creating directory: C:\Program Files (x86)\Project\forge_src\eclipse\.metadata\.plugins\org.eclipse.debug.ui
2015-04-16 12:56:05.226 Successfully installed the file.
2015-04-16 12:56:05.228 -- File entry --
2015-04-16 12:56:05.230 Dest filename: C:\Program Files (x86)\Project\forge_src\gradle\wrapper\gradle-wrapper.jar
2015-04-16 12:56:05.232 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.233 Installing the file.
2015-04-16 12:56:05.235 Creating directory: C:\Program Files (x86)\Project\forge_src\gradle
2015-04-16 12:56:05.237 Creating directory: C:\Program Files (x86)\Project\forge_src\gradle\wrapper
2015-04-16 12:56:05.262 Successfully installed the file.
2015-04-16 12:56:05.265 -- File entry --
2015-04-16 12:56:05.267 Dest filename: C:\Program Files (x86)\Project\forge_src\gradle\wrapper\gradle-wrapper.properties
2015-04-16 12:56:05.268 Time stamp of our file: 2015-03-27 14:49:32.000
2015-04-16 12:56:05.270 Installing the file.
2015-04-16 12:56:05.281 Successfully installed the file.
2015-04-16 12:56:05.283 -- File entry --
2015-04-16 12:56:05.285 Dest filename: C:\Program Files (x86)\Project\forge_src\src\main\java\com\example\examplemod\ExampleMod.java
2015-04-16 12:56:05.287 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:05.288 Installing the file.
2015-04-16 12:56:05.290 Creating directory: C:\Program Files (x86)\Project\forge_src\src
2015-04-16 12:56:05.292 Creating directory: C:\Program Files (x86)\Project\forge_src\src\main
2015-04-16 12:56:05.294 Creating directory: C:\Program Files (x86)\Project\forge_src\src\main\java
2015-04-16 12:56:05.296 Creating directory: C:\Program Files (x86)\Project\forge_src\src\main\java\com
2015-04-16 12:56:05.298 Creating directory: C:\Program Files (x86)\Project\forge_src\src\main\java\com\example
2015-04-16 12:56:05.300 Creating directory: C:\Program Files (x86)\Project\forge_src\src\main\java\com\example\examplemod
2015-04-16 12:56:05.311 Successfully installed the file.
2015-04-16 12:56:05.315 -- File entry --
2015-04-16 12:56:05.317 Dest filename: C:\Program Files (x86)\Project\forge_src\src\main\resources\mcmod.info
2015-04-16 12:56:05.319 Time stamp of our file: 2015-03-27 14:49:34.000
2015-04-16 12:56:05.320 Installing the file.
2015-04-16 12:56:05.322 Creating directory: C:\Program Files (x86)\Project\forge_src\src\main\resources
2015-04-16 12:56:05.334 Successfully installed the file.
2015-04-16 12:56:05.335 -- File entry --
2015-04-16 12:56:05.337 Dest filename: C:\Program Files (x86)\Project\installers\gradle.bat
2015-04-16 12:56:05.338 Time stamp of our file: 2015-04-15 00:53:28.000
2015-04-16 12:56:05.339 Installing the file.
2015-04-16 12:56:05.341 Creating directory: C:\Program Files (x86)\Project\installers
2015-04-16 12:56:05.350 Successfully installed the file.
2015-04-16 12:56:05.351 -- File entry --
2015-04-16 12:56:05.353 Dest filename: C:\Program Files (x86)\Project\installers\gradle.exe
2015-04-16 12:56:05.354 Time stamp of our file: 2015-04-15 17:04:28.000
2015-04-16 12:56:05.356 Installing the file.
2015-04-16 12:56:05.375 Successfully installed the file.
2015-04-16 12:56:05.376 -- File entry --
2015-04-16 12:56:05.378 Dest filename: C:\Program Files (x86)\Project\installers\Inno Development.iss
2015-04-16 12:56:05.379 Time stamp of our file: 2015-04-16 12:55:44.000
2015-04-16 12:56:05.380 Installing the file.
2015-04-16 12:56:05.390 Successfully installed the file.
2015-04-16 12:56:05.424 Installation process succeeded.
2015-04-16 12:56:05.428 -- Run entry --
2015-04-16 12:56:05.431 Run as: Current user
2015-04-16 12:56:05.432 Type: Exec
2015-04-16 12:56:05.433 Filename: E:\Project\installers\gradle.bat
2015-04-16 12:56:05.613 Process exit code: 1
2015-04-16 12:56:05.616 Need to restart Windows? No
2015-04-16 12:56:07.229 Deinitializing Setup.
2015-04-16 12:56:07.241 Log closed.
答案 0 :(得分:1)
第一个问题是您引用[Run]
部分中的源文件,而不是已安装的文件。
无关的旁注:您也不应该对Program Files (x86)
的路径进行硬编码。使用{pf}
,{pf32}
甚至更好的{app}
常量。
[Files]
Source: "E:\Project\*.*"; DestDir: "{app}"; Flags: recursesubdirs
[Run]
Filename: "{app}\installers\gradle.bat";
但是,如果您实际在构建它的同一台计算机上测试安装程序,安装程序仍应在源目录中找到gradle.bat
。
在这种情况下,问题将出现在实际的批处理文件中。如果没有看到它的代码,我们无法帮助您。一般提示是将一些日志记录添加到批处理文件并检查它。您可以将代码解压缩到单独的批处理文件(例如gradle_internal.bat
),然后通过重定向从gradle.bat
调用该代码:
gradle_internal.bat 2>&1 > %TEMP%\gradle.log