Visual Basic installer production!!

zhaozj2021-02-16  47

Visual Basic installer production

The installer production is an essential process for the project. There are many installation software on the Internet. You can use the five-flowers eight to describe ~~~~

In this case, the author introduces a simple installation method, which is packaged with the packaged package of VB. Although it is more common, there are many tricks inside, I believe this point knows people may not! ! (Please see the last, the good play is behind, don't talk, start entering the topic.

The program source code can go to my website to download: http://www.j2soft.cn/

Author: Cui Zhanmin

Email: cuizm@163.com

1 Run the package wizard, as shown below:

2 Click the "Browse" button to select the project you want to pack. Then click the "Package" button (here only introduce the package, the other features do not introduce). Go to the next page, as shown below:

3 Select the type of package to package, the normal EXE project selects "Standard Installation Pack", the location of the control is used, if you are using it in the web, please select "Internet Package", then click "Next "Button. As shown below:

4 Select the location where the package file is stored (this is not more to say more), as shown below:

5 Wizard automatically identifies the controls, DLL and other files applied in the project. You need to check it yourself to check it, see if the files contained are all, the files belled in the third-party control must bring it, otherwise a lot of trouble ~ ~~, then click Next, as shown below:

6 Select the file type package, as needed, if you publish it is using an CD, select a single compressed file, if the release is used with a floppy disk, select multiple compressed files. (Of course, this is not absolute, you can also choose multiple compressed files with the disc, but no one can do it ~~~). Then click Next. As shown below:

7 Determine the title of the installer, is the text displayed on the installation background. Then click Next, as shown below:

8 Here you can set this item in the Start Menu, such as you can add a file, you can select the New Item button, then enter $ (WinPath) /st6unst.exe -n in the "Target" field. "$ (Apppath) /st6unst.log", including dual quotes. Select "$ (WinPath) in the" Start "project, not including double quotes. Then click OK, as shown below:

⑨ You can change the installation location of the folder, then click "Next", as shown below:

⑩ You can set the file to sharing (ie, the file can be used by multiple programs). The installation is completed so far.

Three files and a folder will be generated after installation, as shown below:

SERTUP.LST installation information file

The .cab file is a data file, all installed files in the package.

Setup.exe is the main file installed.

Support is all files included in the compressed package. As shown below:

There is a more important file in this folder to "license set .bat" this batch file (different projects, file names will be different), when your project changes, you can recompile the project, then Copy the execution file to this support directory, you can re-package it without the need to run the Packing Wizard each change. There is also a more important file to setup1.exe file. He is the main file installed. When we installed the interface, this file is running. He is written in VB, source program in VB installation directory: "C: / Program Files / Microsoft Visual Studio / VB98 / Wizards / PDWizard / Setup1 / Setup1.vbp", you can use VB to edit this project ( The VB installation interface is too ugly, so you can change yourself, how to change your own ability ~~~), if you want to add a shortcut to the desktop after installation, you can compile this project. Open the "FRMSETUP1" window, add the following code at the location of the 463th line of its code:

Dim Sprogramspath As String

Dim SDESKTOPPATH AS STRING

Sprogramspath = getSpecialFolder (sfidprograms)

SDESKTOPPATH = GetSpecialFolder (sfidDesktop)

Sprogramspath = Sprogramspath & "/" & gstrappname & "& gstrappname &" .lnk "

SDESKTOPPATH = SDESKTOPPATH & "/" & gstrappname & ".lnk"

FileCopy Sprogramspath, SDESKTOPPATH

The following is described below, as shown below:

This is the content of the first area of ​​the file. Setuptitle is set to the title of the decompressed window, and setupText is set to the content of the decompressed window. After the change, as shown below:

Next, let's introduce the role of the SERTUP.LST file setup area, as shown below:

Change the color of the color to different values, change the background color of the installation window (the default is blue, and it is tired). After the change is 16, it is green (of course, there are other colors, you can slowly try ~~~), the effect is as shown below (this is the installation interface of the installer after I change the VB, everyone thinks Symptom, is it more inferior to some of the other installation software):

转载请注明原文地址:https://www.9cbs.com/read-25197.html

New Post(0)