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. 修改Oracle Client的字符集

    修改Oracle Client的字符集 找到注册表 HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1下的 NLS_LANG,修改键值为SIMP ...

  2. [MODx] Build a CMP (Custom manager page) using MIGX in MODX 2.3 -- 2

    We are not finishing yet... 1. Under MIGX Management, we need to add some "Actionbuttons" ...

  3. iOS开发——UI篇OC&transform详解

    transframe属性详解 1. transform属性 在OC中,通过transform属性可以修改对象的平移.缩放比例和旋转角度 常用的创建transform结构体方法分两大类 (1) 创建“基 ...

  4. android119 侧滑菜单

    MainActivity.java package com.heima52.slidemenu; import com.heima52.slidemenu.view.SlideMenu; import ...

  5. HttpClient 4.3.* 上传带中文文件名文件文件名乱码问题的解决

    又是折腾了一天才解决的问题,网上关于这个问题的资料不多,希望写出来能帮到有需要的人. 之前无论怎么设置charset都不起作用, 后来看了这篇文章 才发现MultipartEntityBuilder有 ...

  6. careercup-中等难度 17.6

    17.6 给定一个整数数组,编写一个函数,找出索引m和n,只要将m和n之间的元素排好序,整个数组就是有序的.注意:n越小越好,也就是说,找出符合条件的最短序列. 解法: 开始解题之前,让我们先确认一下 ...

  7. 文件I/O(不带缓冲)之write函数

    调用write函数向打开的文件写数据. #include <unistd.h> ssize_t write( int filedes, const void *buf, size_t nb ...

  8. PHP之open_ssl

    http://www.wapm.cn/phpdoc/zh/openssl.installation.html http://liuxufei.com/weblog/jishu/376.html dem ...

  9. Day03 - Python 函数

    1. 函数简介 函数是组织好的,可重复使用的,用来实现单一或相关联功能的代码段. 函数能提高应用的模块性,和代码的重复利用率.Python提供了许多内建函数,比如print():也可以自己创建函数,这 ...

  10. IPC:shared memory

    #include <stdio.h> #include <sys/shm.h> #include <sys/stat.h> int main () { int se ...