Use setup factory 7.0 to create an installer

Source: Internet
Author: User

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 cracking programs, Chinese programs, 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.

There is also a situation that needs to be highlighted, that is, the installation program does not need to manually select the installation directory, but is fixed to a directory installed on the computer, such as plug-ins, localization, and cracking. 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.

 

Setup factory7.0Use

1. Start setup factory and enter the following interface

Select create to create a project, and open to open a project

2. Select "CREATE" to go to the following page:

Enter some information about your company and the name and version number of the packaged product,

3. click Next.

Click "Browse" to select the project file to be packaged

4. click Next.

Select whether to use the wizard for the installation program, and click Next to select the interface style of the installation program.

5. Next, the installation program language selection interface is displayed. multiple languages are supported.

The following options are selected by default to generate a new project for the package.

6. Select Screen --- before installing, as shown in figure

Click "add" to select the page that appears during the installation process, such as the welcome page, installation directory, and serial number.

7. By adding setting --- security, you can set multiple sets of sequences for program installation.

8. Set the output file path and EXE file name through building setting, and the building will be OK.

The above is the simple use of setting factory, more functions to be continued

Sister heisi in the office
Sexy glasses sister
Beautiful motorcycle models
Lili

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.