Running InstallUtil {app} /file.exe in inno configuration

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

Here is 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 does not work (but the files are copied to the {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 is going on? I have to use inno setup.

+4
source share
2 answers

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

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

{app} may contain spaces and therefore should be correctly specified when used on the command line:

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

The most external set of quotes for Inno itself; each pair of double quotes inside this will end up putting one quote on the command line.

+4
source

Source: https://habr.com/ru/post/1496515/


All Articles