(Go to) Inno Setup (6) -- create a folder in the program directory

Source: Internet
Author: User

This article Reprinted from: http://blog.csdn.net/yushanddddfenghailin/article/details/17250789

You can use the [dirs] section to create a folder. The Code is as follows:

[Setup]

; Global settings, this section is required

Appname = test

Appvername = test

Defaultdirname = "E: \ test"

Appversion = 1.0

[Files]

Source: "F: \ Desktop \ test \ ipmsg.exe"; destdir: "{app }";

Source: "F: \ Desktop \ test \ readme.txt"; destdir: "{app}"; flags: isreadme

[Dirs]

Name: "{app} \ workdir"

After installation, a new folder workdir will be created under the installation directory:

Of course, this folder is blank and can generally be used as the initial working directory or the directory that stores the results.

In addition, in this case, if you uninstall the program, what will happen to the folder?

1. If the folder is blank, it will be deleted.

2. If the folder is not empty, it will be retained.

This is the default method. If you need to customize it, you can use a flag. The valid flag is as follows:

 

Flag Space

Description

Deleteafterinstall

Tells the installer to create the directory as usual, but after the installation is complete (or interrupted), if it is empty, delete it

Setntfscompression

Allow the folder to be compressed by NTFS

Uninsalwaysuninstall

Tell the uninstall program to delete the directory if it is empty. This is the default method.

Uninsneveruninstall

Tell the uninstall program not to delete this directory

Unsetntfscompression

The folder cannot be compressed by NTFS.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.