[Inno Setup] 在 File Section 之前解压文件
procedure ExtractTemporaryFile(const FileName: String);
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.
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 之前解压文件的更多相关文章
- SpringMVC上传压缩文件,解压文件,并检测上传文件中是否有index.html
SpringMVC上传压缩文件,解压文件,并检测上传文件中是否有index.html 说明: 1.环境:SpringMVC+Spring+Tomcat7+JDK1.7 2.支持 zip和rar格式的压 ...
- JAVA解压文件
package com.chauvet.utils; import java.io.File; import java.io.FileOutputStream; import java.io.IOEx ...
- 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. ...
- 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 ...
- Linux命令(16)压缩,解压文件
tar: 简介:tar命令只是把目录打包成一个归档(文件),并不负责压缩.在tar命令中可以带参数调用gzip或bzip2压缩.因为gzip和bzip2只能压缩单个文件. 在linux下是不需要后缀名 ...
- .NET使用ICSharpCode.SharpZipLib压缩/解压文件
SharpZipLib是国外开源加压解压库,可以方便的对文件进行加压/解压 1.下载ICSharpCode.SharpZipLib.dll,并复制到bin目录下 http://www.icsharpc ...
- Unity3D研究院之LZMA压缩文件与解压文件
原地址:http://www.xuanyusong.com/archives/3095 前两天有朋友告诉我Unity的Assetbundle是LZMA压缩的,刚好今天有时间那么就研究研究LZMA.它是 ...
- 遍历文件夹及其子文件夹下的.pdf文件,并解压文件夹下所有的压缩包
List<PDFPATH> pdfpath = new List<PDFPATH>(); List<string> ziplist = new List<st ...
- 关于Java解压文件的一些坑及经验分享(MALFORMED异常)
文章也已经同步到我的csdn博客: http://blog.csdn.net/u012881584/article/details/72615481 关于Java解压文件的一些坑及经验分享 就在本周, ...
随机推荐
- Django-CBV&FBV
django中请求处理方式有2种:FBV 和 CBV 一.FBV FBV(function base views) 就是在视图里使用函数处理请求. urls.py from django.conf.u ...
- /usr/lib/jvm/java-1.8.0-openjdk/release 没有这个文件或目录
在Java1.8以上,安装以后再安装目录是自动生成一个release文件,用于记录Java和系统信息.但是在centos中,如果你的Java是在安装系统时选择自动安装的,那么在标题那个目录下,也就是j ...
- JavaScript基本数据类型及其转换规则
ECMAScript 数据类型 ECMAScript中有五种基本数据类型:Undefined, Null, Boolean, Number, String 一种复杂数据类型:Object 数据类型检测 ...
- Go gRPC进阶-超时设置(六)
前言 gRPC默认的请求的超时时间是很长的,当你没有设置请求超时时间时,所有在运行的请求都占用大量资源且可能运行很长的时间,导致服务资源损耗过高,使得后来的请求响应过慢,甚至会引起整个进程崩溃. 为了 ...
- Markdown语法详解-cnblog
博客的重要性 博客,英文名为Blog,它的正式名称为网络日记. 为什么要写博客? 需要总结和思考.有时候我们一直在赶路,却忘了放慢脚步 提升文笔组织能力 提升学习总结能力 提升逻辑思维能力 帮助他人, ...
- <E> 泛型
/* * 使用集合存储自定义对象并遍历 * 由于集合可以存储任意类型的对象,当我们存储了不同类型的对象,就有可能在转换的时候出现类型转换异常, * 所以java为了解决这个问题,给我们提供了一种机制, ...
- String 对象-->indexOf() 方法
1.定义和用法 indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置,即下标. 如果没有找到匹配的字符串则返回 -1. 语法: string.indexOf(searchvalue ...
- Python爬虫系列(四):Beautiful Soup解析HTML之把HTML转成Python对象
在前几篇文章,我们学会了如何获取html文档内容,就是从url下载网页.今天开始,我们将讨论如何将html转成python对象,用python代码对文档进行分析. (牛小妹在学校折腾了好几天,也没把h ...
- 09-sass
一.sass和scss sass最初是为了配合haml设计的,不需要大括号,用tab缩进 从第三代开始,保留缩进风格,完全向下兼容普通的css代码 二.下载配置sass compass是sass的一个 ...
- 令人迷惑的Gamma
概述 首先我想说,接触到Gamma的概念也很长时间了,一直没有认真的去学习它.知其然而不知其所以然.最近恰巧学到了这一部分,就想彻底地搞懂它. CRT 说起Gamma,肯定离不开CRT(阴极射线管). ...