After compiling and compiling a program in VB and other languages, we often want to make a beautiful installation program to release our own software. We recommend using setup factory 7.0, which is a powerful Installation tool. This software provides the installation and production wizard interface, even if you do not know about installation and production, you can also generate professional installation programs. You can create shortcuts, add content directly in the Windows registry, add a set value in win. ini and system. ini, and set anti-installation options. The Wizard provided in it allows you to build beautiful and professional installation programs step by step. The latest version of the software is 7.0.1, can be downloaded online, or visit the software of the Chinese site http://www.hanzify.org to download.
Here I will briefly introduce how to use setup factory 7.0 to create an installer.
After the software is opened, a Project Wizard interface is displayed by default, such.
Click Create to create a project, or press ESC to exit the Project Wizard. After setup factory 7.0 is installed for the first time, the default language is English (may vary depending on the software version), which makes it inconvenient to create the installation program, therefore, you must first change the default language to simplified Chinese. So here we Press ESC to exit the Project Wizard and directly enter the main interface of the software. For example.
Select "parameter selection" in the editing of the main interface menu, open the document in the displayed window, click ages, and select Chinese (simplified) on the right of the window ), click "set as default" at the bottom and click "OK. For example.
Now we can start to make the installation program. First, add the installation file. Select "add file" from the project menu, or select "add file" from the file on the left side of the main interface ". As shown in, if multiple files are added, you can select "all files in this folder". If there are subfolders, select the third item "all files in this folder and Its subfolders ". Click Add.
After the file is added, as shown in.
Right-click a file (you can edit multiple files) and select "file attributes" to modify the settings. As shown in, the default value is % appfolder % in the target. This variable indicates the installation path and can be changed to other built-in variables or custom variables.
If the file is an executable file (such as an EXE file), a shortcut is created in the Start Menu by default. Click the shortcut in to see the relevant settings. If you do not need shortcuts, you can cancel the selection of related projects. For example.
After the file is added, we need to set information about the installer, such as variable definition and Software Uninstall.
Click "session variables" in the settings on the left, as shown in. These variables are built-in variables of setup factory 7.0, which can be used during installation after being defined here or in the code.
By default, the new installer creates and uninstalls the software. If you do not need to uninstall the software, click "Settings" on the left of the main interface to close "Create and unmount ". For example.
Next we will begin to make the screen during installation. The screen consists of three parts: before installation, during installation, and after installation. Click the project topic on the left-side screen of the main interface. In the displayed window, select a project topic to change the installation screen style.
Click "before installation" to add or delete the corresponding screen on the left side of the window. For example.
After a screen is selected, click the edit button below the window to edit the screen. For example.
You can modify the screen title and buttons in "properties. For example.
In "operations", you can program the screen event. For example. You can add the corresponding code to implement the required functions through the "add operation" and "Add code" at the bottom of the window.
On the "install at" screen, deselect the "display process screen during installation" option, which will no longer appear during installation. For example.
If you only want to not display the copied file name and path during installation, click "edit" and deselect "show status text 1. For example.
After installation, You can edit the screen after installation. For example.
After the above process is completed, a simple installer can be released. Click build in the menu release, as shown in. By default, "Web (single file)" is selected, and then click Next.
Determine the output installer folder and installer file name, as shown in. Click "build.
Now we can test the installation program. Don't forget to save the setup factory 7.0 project to your computer.
Http://www.onegreen.net/Article_Show2.asp? ArticleID = 682
Advanced
In the basic article, we briefly talked about the installation process, but if you encounter an installation program that is a little complicated, such as editing the registry, or What should I do if an external file needs to be executed during the installation process? Don't worry. After reading the advanced article, you will know what to do.
Since it is necessary to handle various complex events, programming is essential. Setup factory 7.0 also provides its own language for coding, mainly in "screen" and "operation. Let's take a look at the "operations" on the left side of the main interface. There are four items: Start, pre-install, installation, and shutdown. For example.
Click "Start time" to compile the Event code to be processed when the installation program starts. For example.
Click "add operation" at the bottom of the window to add the Event code provided by setup factory 7.0. For example.
For example, to add a dialog box that requires password input, you can select the input operation in the dialog category, as shown in.
After clicking Next, enter the corresponding data in the shards of the Operation, as shown in.
After clicking finish, the Operation will appear in the window as code, as shown in.
Then, you can add a Condition Statement to determine whether the password is valid. Click "Add code" at the bottom of the window and select "If statement (not equal )". For example.
After the code is added, several more sections of code are added in the window, such.
In this case, you need to modify the code in the format provided by it. For example.
You must add an invalid password to the IF statement to indicate a Password error or exit the installer. Click "add operation" and select the message operation in the dialog category and the exit Operation in the Application category. The code is shown in.
In this way, a simple Password Logon function is implemented. Some flaws are that the entered password is displayed in plaintext. However, this article describes how to implement the corresponding functions by adding operations and code. Otherwise, we can add verification serial numbers on the screen before installation to implement this function.
So how can we implement the serial number verification function? First, we need to generate the serial number of the installer. Click the serial number in the menu project. The window shown in is displayed.
Select List 1, click Edit, and select generate in the command. For example.
Enter the number and format of the required serial number, for example.
After confirming, you can generate the required serial number, as shown in. You can select all these serial numbers and export them to a text file.
After confirming, go to the screen before installation to add the verification serial number screen. For example. In this way, the serial number verification function is implemented during the installation process.
Click expiration in the project in the menu, and enable relevant settings, the installer can also use the expiration function. For example.
If the date on the computer where the installation program is executed is not within this range, the following screen is displayed. However, the expiration function is not very practical, because you only need to change the date on your computer to the installation date and continue to use it.
Sometimes, during or after installation, You need to execute one of the programs, such as PJ program, Chinese program, or a driver, which may not need to be installed on your computer, it only needs to be executed once during installation. So we can do this.
Because this program does not need to be installed with other files on the computer, you cannot add files to the installation package by adding files. Instead, you can click "raw files" in "Resources" on the left side of the main interface to add files, for example. In this way, when the installer is executed, the file is decompressed to the temporary directory and automatically deleted after the installer is properly closed.
Then, we can add the corresponding code in a screen. For example, if you want to execute the program after installation but before the screen is displayed, you can add shell. Execute to the "on preload" Operation on the screen. If the program file is named “setup.exe, you can write it as "_ templaunchfolder .." // setup.exe "". That is to say, the combination of a variable and a string can be written in the format of "_ variable name... string. It is not enough to add this code. We need to determine whether the program has been executed to continue the next step, such as executing the next external program or something. In this way, we need to use the loop Statement by adding the "Repeat... To get a loop statement, add operation file. isinuse to the loop, assign the value to a custom variable, and modify the loop condition. For example.
Another situation needs to be emphasized, that is, the installation program does not need to manually select the installation directory, but is fixed to a directory on the computer, such as plug-ins, Chinese, PJ, etc. The directory may be obtained by reading the installation path of a software in the Registry to redefine it. The following describes how to create an ECS instance.
First, we need to obtain the installation path from the Registry. This process should be executed when the installation program starts. Click "Start Time" in "operation" on the left of the main interface to add the registry operation. getvalue, and assign the value to a custom variable, registry. in the getvalue writing method, note that the subkey sub-key name sub-key connector is "//", as shown in.
In this case, the variable productpath in gets an installation path, which can be used as the installation path of this installer after a little processing. However, because the variable is defined in the Code, it cannot be used in the "target" of the file attribute in the installation package. The variables in the "target" must be session variables, so we can assign the productpath variable to a session variable. The session variables can be self-contained or customized in setup factory 7.0. Click "session variables" in "Settings" on the left of the main interface, and then click "add" at the bottom of the window to add custom session variables. For example.
Then, assign the productpath variable to the session variable in the Code. Note that the sessionvar operation must be used. set to assign values to session variables, such as sessionvar. set ("% appfolder %", productpath ). For example.
If the installer needs to install the files in the installation package to different directories, you must change the "target" in these file attributes to different session variables.
The common functions of setup factory 7.0 are similar. They mainly depend on how you use the built-in operations properly, and then combine the control code to compile a powerful installer.
Http://apps.hi.baidu.com/share/detail/729350