[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解压文件的一些坑及经验分享 就在本周, ...
随机推荐
- # H - H HDU - 2066 (多起点、多终点问题)
H - H HDU - 2066 (多源点.多汇点问题) 一个图上,有M条边,Z个出发点,Y个终止点.求一条最短路,其中起点是Z中的任意一点,终点是Y中任意一点. Input 输入数据有多组,输入直到 ...
- P1343 地震逃生(最大流板题)
P1343 地震逃生 题目描述 汶川地震发生时,四川**中学正在上课,一看地震发生,老师们立刻带领x名学生逃跑,整个学校可以抽象地看成一个有向图,图中有n个点,m条边.1号点为教室,n号点为安全地带, ...
- linux系统管理,查看系统资源
free 查看内存使用情况 -b ===> 以byte为单位 -k ===> 以Kb为单位 -m ===> 以Mb为单位 -g ===> 以Gb为单位 -t ...
- C/C++ 数据精确度的设置
#include<iostream>#include<iomanip> //此库为代码最后一行快捷设置数据格式需要用的的库 #include<math.h>usin ...
- 在IDEA导入maven项目
1.依次打开File—New—Module from Existing Sources...
- Nodejs开发微信公众号中控服务
本文已同步到专业技术网站 www.sufaith.com, 该网站专注于前后端开发技术与经验分享, 包含Web开发.Nodejs.Python.Linux.IT资讯等板块. 本项目旨在为多个微信公众号 ...
- python--->相对和绝对路径
绝对路径(absolute path):从根开始找 eg:c:\file\01.txt 相对路径(relative path):相对当前文件内找 ../ # 当前文件的上一级 os.path ...
- 不错的spring学习博客
http://blog.csdn.net/xyh820/article/details/7303330/
- 背景知识+监督和无监督学习辨析+预备知识(1-1—1-4/用时4h)
1-1/1.2,基本上都是一些基础知识,机器学习的背景,发展,概念,用途 1-3,监督学习: 数据集类型已知,数据信息为已知正解--由已知正解推测趋势(拟合分布函数)-- 给出的模型例子--基本类似于 ...
- CSS两种盒子模型:cntent-box和border-box
cntent-box 平时普通盒子模型,padding,border盒子会变大,向外扩展border-box 特殊盒子模型,padding,border盒子会变大,向内扩展