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