Iexpress hard-coded extraction destination folder?

I use iexpress to create my own executable. Is there a way that I can hard-code the extraction destination folder (preferably to a temporary somehwere folder) so that the pop-up window "Please enter the location where you want to place the extra file" is not extracted. dialogue?

+4
source share
2 answers

There is no direct way to do this. (You can see my other answer for a more detailed explanation.)

The simplest solution is to create an IExpress archive that runs the β€œinstaller,” which is actually a batch file that copies the extracted files where they are needed.

In IExpress you should run the batch file, for example: cmd /c persist.bat . And persist.bat looks something like this:

 @echo off xcopy /y * "%temp%\persistent\" del /f "%temp%\persistent\persist.bat" 

(The last line is a subtlety to hide the fact that you used this batch file to copy the extracted archive.)

+2
source

Yes, this is possible by using the .INF file when you select "Extract files and run the installation command." You must install the .INF file as your installer, and in the DestinationDirs section, you put the path in the directory where the files should be sent. The following is an example .INF file:


 [version] signature="$CHICAGO$" [DefaultInstall] CopyFiles=install.files [DestinationDirs] install.files=-1,"C:\Program Files\MyCustomDir" [install.files] MyFile1.txt MyFile2.bmp 

So this example shows that the installer will install C: \ Program Files \ MyCustomDir. The files under install.files should display all the files you want to copy to this folder. They should be included in your installer when selecting files to add.

+2
source

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


All Articles