我想知道是否有任何方式可以从Inno Setup的Exec功能中运行命令提示符,而这会隐藏用户的输出。目前,我有以下功能,我想这样做。
Exec(
'cmd.exe',
'/c ' + InstallPath + '\initdb ' + '-U postgres -A password -E utf8 --pwfile=' +
InstallPath + '\password.txt -D ' + DataPath,
'', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Run Code Online (Sandbox Code Playgroud)
我知道您可以在该Run部分添加一个标志,但实际上还没有找到类似的标志。任何帮助,将不胜感激。
我不知道为什么,但是当我尝试将文件从安装目录复制到时system32,虽然在Inno Setup中读取为成功安装,但它没有这样做。这是我的代码:
[Files]
; specifies what files will be included in the installation
Source: "{src}\..\elt.properties"; DestDir: "C:\elt"; Flags: ignoreversion; BeforeInstall: SetProgressMax(10);
Source: "{src}\..\msvcr120.dll"; DestDir: {sys}; Flags: onlyifdoesntexist;
Run Code Online (Sandbox Code Playgroud)
我还想包括我的日志输出,因为我觉得很奇怪该文件的时间如此之短,我正在2016年7月8日上午11点左右编写此文件
[11:49:36.526] -- File entry --
[11:49:36.528] Dest filename: C:\Windows\system32\msvcr120.dll
[11:49:36.529] Time stamp of our file: 2013-10-04 23:58:24.000
[11:49:36.530] Installing the file.
[11:49:36.566] Successfully installed the file.
Run Code Online (Sandbox Code Playgroud)