Prototype:

procedure ExtractTemporaryFile(const FileName: String);

Description:

Extracts the specified file from the [Files] section to a temporary directory. To find the location of the temporary directory, use ExpandConstant('{tmp}').

The extracted files are automatically deleted when Setup exits.

An exception will be raised if the file wasn't extracted successfully, if the file wasn't found, or if the file was found but couldn't be processed because of its MinVersion and/or OnlyBelowVersion parameters.

Remarks:

Use Flags: dontcopy in the [Files] section to tell Setup to skip the file during the normal file copying stage.

Use Flags: noencryption in the [Files] section if encryption is enabled and you call the ExtractTemporaryFile function prior to the user entering the correct password.

When solid compression is enabled, be sure to list your temporary files at (or near) the top of the [Files] section. In order to extract an arbitrary file in a solid-compressed installation, Setup must first decompress all prior files (to a temporary buffer in memory). This can result in a substantial delay if a number of other files are listed above the specified file in the [Files] section.

[Files]
Source: "Readme.txt"; Flags: dontcopy noencryption [Code]
function InitializeSetup: Boolean;
var
S: AnsiString;
begin
// Show the contents of Readme.txt (non Unicode) in a message box
ExtractTemporaryFile('Readme.txt');
if LoadStringFromFile(ExpandConstant('{tmp}\Readme.txt'), S) then
begin
MsgBox(S, mbInformation, MB_OK);
end; Result := True;
end;

[Inno Setup] 在 File Section 之前解压文件的更多相关文章

  1. SpringMVC上传压缩文件,解压文件,并检测上传文件中是否有index.html

    SpringMVC上传压缩文件,解压文件,并检测上传文件中是否有index.html 说明: 1.环境:SpringMVC+Spring+Tomcat7+JDK1.7 2.支持 zip和rar格式的压 ...

  2. JAVA解压文件

    package com.chauvet.utils; import java.io.File; import java.io.FileOutputStream; import java.io.IOEx ...

  3. tar -zxvf file.tar.gz //解压tar.gz

    http://apps.hi.baidu.com/share/detail/37384818 download ADT link http://dl.google.com/android/ADT-0. ...

  4. Linux tar (打包.压缩.解压缩)命令说明 | tar如何解压文件到指定的目录?

    打包举例:将 /usr/local/src/zlib-1.2.5目录下的文件打包成 zlib-1.2.5.tar.gz cd /usr/local/src tar -czvf ./zlib-1.2.5 ...

  5. Linux命令(16)压缩,解压文件

    tar: 简介:tar命令只是把目录打包成一个归档(文件),并不负责压缩.在tar命令中可以带参数调用gzip或bzip2压缩.因为gzip和bzip2只能压缩单个文件. 在linux下是不需要后缀名 ...

  6. .NET使用ICSharpCode.SharpZipLib压缩/解压文件

    SharpZipLib是国外开源加压解压库,可以方便的对文件进行加压/解压 1.下载ICSharpCode.SharpZipLib.dll,并复制到bin目录下 http://www.icsharpc ...

  7. Unity3D研究院之LZMA压缩文件与解压文件

    原地址:http://www.xuanyusong.com/archives/3095 前两天有朋友告诉我Unity的Assetbundle是LZMA压缩的,刚好今天有时间那么就研究研究LZMA.它是 ...

  8. 遍历文件夹及其子文件夹下的.pdf文件,并解压文件夹下所有的压缩包

    List<PDFPATH> pdfpath = new List<PDFPATH>(); List<string> ziplist = new List<st ...

  9. 关于Java解压文件的一些坑及经验分享(MALFORMED异常)

    文章也已经同步到我的csdn博客: http://blog.csdn.net/u012881584/article/details/72615481 关于Java解压文件的一些坑及经验分享 就在本周, ...

随机推荐

  1. 从火车站车次公示栏来学Java读写锁

    Java多线程并发之读写锁 本文主要内容:读写锁的理论:通过生活中例子来理解读写锁:读写锁的代码演示:读写锁总结.通过理论(总结)-例子-代码-然后再次总结,这四个步骤来让大家对读写锁的深刻理解. 本 ...

  2. 2019ICPC(银川) - Delivery Route(强连通分量 + 拓扑排序 + dijkstra)

    Delivery Route 题目:有n个派送点,x条双向边,y条单向边,出发点是s,双向边的权值均为正,单向边的权值可以为负数,对于单向边给出了一个限制:如果u->v成立,则v->u一定 ...

  3. 1006 Sign In and Sign Out (25 分)

    At the beginning of every day, the first person who signs in the computer room will unlock the door, ...

  4. 整数回文数判断 Python

    判断一个整数是否是回文数.回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数. 输入:123  输出:false 输入:-121 输出:false 输入:121  输出:true 输入:1  ...

  5. .NET Core项目部署到Linux(Centos7)(四)VMware Workstation虚拟机Centos 7安装

    目录 1.前言 2.环境和软件的准备 3.创建.NET Core API项目 4.VMware Workstation虚拟机及Centos 7安装 5.Centos 7安装.NET Core环境 6. ...

  6. escape和unescape知识点

    decodeURI() 函数可对 encodeURI() 函数编码过的 URI 进行解码. encodeURI() 函数可把字符串作为 URI 进行编码 <script> var uri= ...

  7. spark sql error mismatched input 'union' expecting { <EOF>,''................................

    给union的前后sql加括号就可以解决

  8. JNDI数据源的配置及使用 (2010-11-21 21:16:43)转载▼

    JNDI数据源的配置及使用 (2010-11-21 21:16:43)转载▼ 标签: 杂谈 分类: 数据库 数据源的作用 JDBC操作的步骤: 1. 加载驱动程序 2. 连接数据库 3. 操作数据库 ...

  9. AJ学IOS 之微博项目实战(9)微博模型之时间相关重要操作,判断刚刚,昨天,今年等等

    AJ分享,必须精品 一:效果 二:实现代码 /** 1.今年 1> 今天 * 1分内: 刚刚 * 1分~59分内:xx分钟前 * 大于60分钟:xx小时前 2> 昨天 * 昨天 xx:xx ...

  10. 区块链 Hyperledger Fabric v1.0.0 环境搭建

    前言:最近项目涉及到超级账本,在有些理论知识的基础上,需要整一套环境来. 这是一个特别要注意的事情,笔者之前按照网络上推荐,大部分都是推荐ubuntu系统的,于是下载Ubuntu系统(16.04.5和 ...