7zip self-extracted executable: To extract file to specific directory
1) Install 7-zip (7zS.sfx will be installed to C:\Program Files\7-Zip):
http://7zsfx.solta.ru/en/
2) Copy following script snippet into notepad and save as config.txt with UTF-8 encouding by selecting File -> Save As... -> Switch Encoding to "UTF-8"
;!@Install@!UTF-8!
CancelPrompt="Are you sure you want to cancel?"
FinishMessage="Hi, file has been successfully extracted! "
GUIFlags="8+128"
InstallPath="%Programfiles%\\MyFolder\\Contain Space"
ExtractPathText="Please select extraction path:"
ExtractPathTitle="Welcome to use 7zip self-extracting archive"
ExtractCancelText="Abort"
;!@InstallEnd@!
3) Make a folder for placing the file(s) you expect to extract.
4) Select all and right-click on any one of them, select "Add to archive...", Change archive name, set compression level to Ultra, click OK
5) Copy 7zs.sfx and config.txt to the same folder
6) Open a command line, CD to this folder (Or, press SHIFT [do not let go] and right-click in the blanks inside this folder, select Open command window here)
enter following command line
copy /b 7zs.sfx + config.txt + ArchiveName.7z Self-Extract-Executable-Name.exe
Reference:
http://sevenzip.sourceforge.jp/chm/cmdline/switches/sfx.htm
http://www.msfn.org/board/topic/99843-7-zip-sfx-extract-to-this-folder/
http://sourceforge.net/p/sevenzip/discussion/45797/thread/31dc880f
7zip self-extracted executable: To extract file to specific directory的更多相关文章
- PaodingAnalysis 提示 "dic home should not be a file, but a directory"
Exception in thread "main" net.paoding.analysis.exception.PaodingAnalysisException: dic ho ...
- net.paoding.analysis.exception.PaodingAnalysisException: dic home should not be a file, but a directory!
Caused by: net.paoding.analysis.exception.PaodingAnalysisException: dic home should not be a file, b ...
- File类和Directory类
File类和Directory类分别用来对文件和各种目录进行操作,这两类可以被实例化,但不能被其他类集成. 1. File类(静态类) File类支持对文件的基本操作,它包括用于创建.复制.删除.移动 ...
- opencv c++安装踩坑记录 file cannot create directory: /usr/local/include/opencv2. Maybe need administrative privileges
前言 最近深度学习Ultra-Fast-Lane-Detection/INSTALL.md at master · cfzd/Ultra-Fast-Lane-Detection (github.com ...
- python在使用MySQLdb模块时报Can't extract file(s) to egg cacheThe following error occurred while trying to extract file(s) to the Python eggcache的错误。
这个是因为python使用MySQLdb模块与mysql数据库交互时需要一个地方作为cache放置暂存的数据,但是调用python解释器的用户(常常是服务器如apache的www用户)对于cache所 ...
- .net学习之集合、foreach原理、Hashtable、Path类、File类、Directory类、文件流FileStream类、压缩流GZipStream、拷贝大文件、序列化和反序列化
1.集合(1)ArrayList内部存储数据的是一个object数组,创建这个类的对象的时候,这个对象里的数组的长度为0(2)调用Add方法加元素的时候,如果第一次增加元神,就会将数组的长度变为4往里 ...
- C# IO操作(二)File类和Directory类的常用方法
本篇主要介绍一些常用的IO操作,对文件和目录的操作:留给自己复习之用. 1.创建文件 string sPath1=Path.GetDirectoryName(Assembly.GetExecuting ...
- 文件及文件夹操作- File类、Directory 类、FileInfo 类、DirectoryInfo 类
文件及文件夹操作: C/S:WinForm可以操作客户端文件 Client ServerB/S:Brower Server 命名空间:using system .IO; 1. File类: 创建:Fi ...
- C# IO流 File.Exists,Directory.Exists, File.Create,Directory.CreateDirectory
void Start() { CreateDirectory(); CreateFile(); } //平台的路径(封装起来的一个属性,这不是一个方法) public string path { ge ...
随机推荐
- MySQL 约束
MySQL中约束保存在information_schema数据库的table_constraints中,可以通过该表查询约束信息: 约束主要完成对数据的检验,保证数据库数据的完整性:如果有相互依赖数据 ...
- Swift基本语法以及与OC的比较
一.注释: 1.单行注释和OC一致. 2.块注释中有与OC不同点:可以嵌套注释 二.常量和变量: 1.常量:初始化后可读不可写 let 2.变量:初始化后可读可写 var //不需要指定类型,系统会自 ...
- Ubuntu 安装 Courier New字体
apt-get install ttf-mscorefonts-installer 它的本质是安装 Courier New字体 安装的时候会出现一个协议 按TAB键 ,可以选中<确定>按 ...
- BZOJ 2150: 部落战争 最大流
2150: 部落战争 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline/problem.php? ...
- Nginx+Keepalived+Tomcat之动静分离的web集群
#vi /etc/nginx/nginx.conf############################################user nginx nginx;worker_process ...
- 《RESTful Web Services》第四章 设计URI
引言 URI是跨越Web的资源描述符,一个URI由以下内容组成——协议.主机.端口号.路径
- 文件I/O(不带缓冲)之原子操作
一.添写至一个文件 考虑一个进程,它要将数据添加到一个文件尾端.早期的UNIX系统并不支持open的O_APPEND选项,所以程序被编写成下列形式: ) < ) /* position to E ...
- Linux下各种常见环境变量的配置
Linux系统下各种环境变量都通过修改/etc/profile文件来实现.由于是系统文件,修改此文件需要root权限.因此实现以下功能都需要用户拥有root权限. 另:不要轻易修改profile文 ...
- java_jdbc_batch处理_主键id获取
//create1 速度较慢,create2较快,但是要根据数据库不同来决定 //ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_ ...
- typedef的使用2——定义函数
#include <stdio.h> #include <string.h> #pragma warning(disable:4996) //闲言碎语都先不要讲了,直接上函数吧 ...