在inno设置中运行InstallUtil {app} /file.exe(running InstallUtil {app}/file.exe in inno setup)

编程入门 行业动态 更新时间:2024-10-23 09:21:37
在inno设置中运行InstallUtil {app} /file.exe(running InstallUtil {app}/file.exe in inno setup)

我想将服务文件复制到{app}目录,然后将其用作InstallUtil.exe中的参数。

这是我的代码的一部分:

[Files] Source: WCFService.exe; DestDir: {app} Source: WCFService.exe.config; DestDir: {app} [Run] Filename: {dotnet40}\InstallUtil.exe; Parameters: {app}\WCFService.exe

此代码不起作用(但文件正确复制到{app}目录中)。 但是,如果我使用这样的东西:

[Files] Source: WCFService.exe; DestDir: {src} Source: WCFService.exe.config; DestDir: {src} [Run] Filename: {dotnet40}\InstallUtil.exe; Parameters: WCFService.exe

它工作正常。 有谁知道发生了什么? 我必须使用inno设置。

I want to copy service files to {app} directory and then use this as a parameter in InstallUtil.exe.

Here's some part of my code :

[Files] Source: WCFService.exe; DestDir: {app} Source: WCFService.exe.config; DestDir: {app} [Run] Filename: {dotnet40}\InstallUtil.exe; Parameters: {app}\WCFService.exe

This code doesn't work (but the files are copied into {app} directory correctly). However, if I use something like this :

[Files] Source: WCFService.exe; DestDir: {src} Source: WCFService.exe.config; DestDir: {src} [Run] Filename: {dotnet40}\InstallUtil.exe; Parameters: WCFService.exe

it works correctly. Does anyone know what's going on? I have to use inno setup.

最满意答案

在这种情况下,您可以尝试在[Run]部分中将WorkingDir参数设置为{app} 。 喜欢这个:

[Run] Filename: "{dotnet40}\InstallUtil.exe"; WorkingDir: "{app}"; Parameters: "WCFService.exe"

In this case you could try to set WorkingDir parameter to {app} in the [Run] section. Like this:

[Run] Filename: "{dotnet40}\InstallUtil.exe"; WorkingDir: "{app}"; Parameters: "WCFService.exe"

更多推荐

本文发布于:2023-08-06 17:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1454107.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:app   InstallUtil   inno   file   setup

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!