IExpress stops deleting files from a temporary location

I used IExpress for self-extraction. I want files to be deleted from a temporary location. Is this possible or not?

if not, can any other self-producer do the same or not?

0
source share
1 answer

It seems like this is not possible directly using IExpress, although you can get around it to shreds. There are other archivers that can do this directly; WinRAR comes to mind, although I'm sure there are more.

IExpress has three modes:

  • Extract the files to a temporary directory (it seems something like %temp%\IXP000.TMP ), run the installation command, run the optional command after installation, delete the temporary directory.

  • Extract files; the location must be indicated on the command line, or the user will be prompted for the location. (I could not find a way to set the extraction directory in the Wizard or in the .sed file.)

  • Create a .cab file. (But to be honest, I would just use makecab or cabarc ...)

One way is to merge the IExpress archive into the IExpress archive; the internal archive (which contains your actual files) is a type for extraction only (2), and the external archive (which contains only your internal archive) is the type of installer (1). The external IExpress archive has an installation command, for example:

 cmd /c innerArchive.exe /q /t:"%temp%\persistent" 

This will leave the files in %temp%\persistent . ( cmd /c is required to decompose the variables into %temp% .)

If you really need to run a command to install something, you can specify it as a command after installation (referring to %temp%\persistent if you are using a file from the internal archive). Again you will need cmd /c to deploy this.


Another way, which is perhaps simpler, is to use a simple batch file:

 @echo off xcopy /y * "%temp%\persistent\" rem Execute any other commands here... 

Then you need only one IExpress archive, the installer type (1), which executes the batch file. Make sure you run it as cmd /c persist.bat - otherwise it will be executed by command.com , which is not very convenient.

+2
source

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


All Articles