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的更多相关文章

  1. PaodingAnalysis 提示 "dic home should not be a file, but a directory"

    Exception in thread "main" net.paoding.analysis.exception.PaodingAnalysisException: dic ho ...

  2. 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 ...

  3. File类和Directory类

    File类和Directory类分别用来对文件和各种目录进行操作,这两类可以被实例化,但不能被其他类集成. 1. File类(静态类) File类支持对文件的基本操作,它包括用于创建.复制.删除.移动 ...

  4. 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 ...

  5. 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所 ...

  6. .net学习之集合、foreach原理、Hashtable、Path类、File类、Directory类、文件流FileStream类、压缩流GZipStream、拷贝大文件、序列化和反序列化

    1.集合(1)ArrayList内部存储数据的是一个object数组,创建这个类的对象的时候,这个对象里的数组的长度为0(2)调用Add方法加元素的时候,如果第一次增加元神,就会将数组的长度变为4往里 ...

  7. C# IO操作(二)File类和Directory类的常用方法

    本篇主要介绍一些常用的IO操作,对文件和目录的操作:留给自己复习之用. 1.创建文件 string sPath1=Path.GetDirectoryName(Assembly.GetExecuting ...

  8. 文件及文件夹操作- File类、Directory 类、FileInfo 类、DirectoryInfo 类

    文件及文件夹操作: C/S:WinForm可以操作客户端文件 Client ServerB/S:Brower Server 命名空间:using system .IO; 1. File类: 创建:Fi ...

  9. C# IO流 File.Exists,Directory.Exists, File.Create,Directory.CreateDirectory

    void Start() { CreateDirectory(); CreateFile(); } //平台的路径(封装起来的一个属性,这不是一个方法) public string path { ge ...

随机推荐

  1. JAVA常用设计模式整理

    设计模式:一个程序员对设计模式的理解:“不懂”为什么要把很简单的东西搞得那么复杂.后来随着软件开发经验的增加才开始明白我所看到的“复杂”恰恰就是设计模式的精髓所在,我所理解的“简单”就是一把钥匙开一把 ...

  2. Web应用Word生成

    前段时间接到一个Web应用自己主动生成Word的需求,现整理了下一些关键步骤拿来分享一下. 思路:(注:这里仅仅针对WORD2003版本号.其他版本号大同小异.) 由于WORD文件内部的数据及格式等是 ...

  3. CSDN上下载的一些关于Android程序调用Webservice执行不成功的问题

    今天从书上和CSDN上找了几个关于android调用webservice的样例,这些样例从代码来看.没不论什么错误,可是就是执行不成功.分析了android调用web接口的写法,发现这些样例在调用的时 ...

  4. PAT 1005

    1005. Spell It Right (20) Given a non-negative integer N, your task is to compute the sum of all the ...

  5. VS2012 编译GDAL

    先安装VS 2012, 然后下载GDAL最新版本代码,解压. 用管理员权限打开Developer Command Prompt for VS2012终端,进入代码目录. 然后运行命令: nmake / ...

  6. Config

    Config Config App Auth Cache Database Languages Mail Modules Routing Session Config Settings for the ...

  7. Controllers

    Controllers Controllers are the bread and butter of the framework they control when a model is used ...

  8. 基础:c++中引用与java中的引用

    using namespace std; class Point { public: double x; double y; Point(){} void setPoint(double x,doub ...

  9. TextView设置动态改变颜色

    通过TextView的setTextColor方法进行文本颜色的设置, 这里可以有3种方式进行设置: 第1种:tv.setTextColor(android.graphics.Color.RED);/ ...

  10. Logstash conf.d 多个配置文件

    概要 今天在群里一个关于在 logstash 的配置目录存在多个配置文件时候如何处理的问题? 我说是加载所有配置文件并合并为一个. lcy@lcy:~/ELK/logstash$ sudo /opt/ ...