Produce professional Windows installation software with installshield
InstallShield can be said to be the best production tool for software installation. Its simple operation, fully visual interface, convenient debugging, multi-platform (Windows 3.1, Windows 95, WindowsNT3.5, Windows NT4.0) language (Chinese, Various Western) support makes it almost installed Produced standards. It is no wonder that Microsoft starts in its fist product Visual C 4.x, including INSTALLSHIELD3 in the form of bundles. Today, with the launch of the sun and the moon, INSTALLSHIELD is a feather feather, but also launched InstallShield Professional 5.x (including East Edition, West Edition) and InstallShield 6.0, which is more powerful and easy to operate. For the producer of ShaReware software, packaging a beautiful installer is very necessary. This article briefly explores the way of installing software with installshield, I hope to help interested friends. In all the latest versions of InstallShield, its specialized East Edition can be applied to Chinese (GB, BIG5), English, Indonesian, Japanese, Korean, Russian, Turkish, Thai language and other languages. This article discusses the discussion of INSTALLSHIELD EAST Edition 5.1. The operations of installshield's other language versions are almost identical to EAST EDITION. Entering InstallShield East Edition 5.1 When you are two "wizards" facing you. Get used to friends with VB can use VB5 Project Wizard, which requires VB5 in your system. More commonly used is Project Wizard, which customizes a more popular installed installer. After entering Project Wizard, as shown in Figure 1: Write the name of your program in the first column, write into the company's name in the second column, select the proposage in the third column, selected program in the fourth column Type, the full column fill in the full path and name of the executable of the program. Click Next, go to Select Custom Dialog: Install your preferences to choose your dialog box that you want to appear when you install, press the PriView key to preview the effects of the respective dialog box. Next is to select the target platform to install. That is, the program will be running on what platform. InstallShield provides four platform options (Win31, Win95, WinNT3.5, Windows NT4.0). Then, multilingual support, that is, the language support that can be provided during installation. Then, the installation type selection is sequentially installed, specifying the constituent component, specifying the file group, and finally all options are summarized. You can get your own project and enter the visual programming environment of InstallShield. Let's take our work step by step. The whole installshield has a high degree of visualization. Support for the right mouse button, the right mouse button can activate the various functions; compile, easy to debug, simply vc this large program, but also more than VC . First, select Scripts in the left. This is the core part of all production, and it is also a small gateway we should concentrate. Of course, you don't change the source program in Scripts, you can also make a standard installer, but if you can control Scripts programming, the production level of the entire installer can reach a new height, which may be the difference between you and the ordinary producer. Bar. In fact, INSTALLSHIELD's Scripts is very similar to C and C programs, which believes that most of the programmers are very easy to master.
For friends who don't have any C and C , after reading this article, I believe that you can also make your own scripts because it has a considerable repetability, it is easier to be orthossed. . The layout of Scripts is very similar to the C language. The first is the contained of the header file, followed by the definition of the string, the description of the function of the function, the instructions for global variables. What you can do is add your function description for your function description. The rules of C are equally local variables and definitions in Scripts. Follow C annotation rules, you can use // to make a single-line annotation, or you can use / * annotation content * / to comment a statement. All keywords, macro definitions marked with different colors, very intuitive. Scripts programming follows the idea of structured programming, providing a large number of WIDOWS APIs for WINDOWS APIs for call, each macro definition has a detailed description, except for detailed description, explains the meaning of each variable, With the corresponding example, refer to these descriptions and examples, the novice can be launched in a very short time. For friends who have developed a Windows program with VC , it is simply a change in 6 = 2 × 3. It can be very easy to master. At the forefront of the program, it is Program ................... Endprogram, which is equivalent to the main () {...} main function. The rear is a procedure for a sub-correspondence, and the order sequence is arranged in the call sequence. All functions are very easy to understand, and it is generally no need to change too much. There are several common and frequently modified functions below.
(1) function SetupFolders () function SetupFolders () NUMBER nResult; STRING szFolderDir; begin szProgramFolder = FOLDER_PROGRAMS ^ SHELL_OBJECT_FOLDER; position szItemName // establish groups or shortcut = "multifunctional image processing system of the eye"; // Application Program name szprogram = targetdir ^ 'Eye95.exe'; // executable file name szparam = ""; longpathtoquote (szprogram, true); // Merge path longpathtoshortpath (szparam); // Transfer to short path, designed for Win31 and WinNT3.5 and szCommandLine = szProgram "" szParam; // generate the command line szWorkingDir = TARGETDIR; // working path szIconPath = "used"; nIcon = 0; szShortCutKey = ""; nFlag = REPLACE; AddFolderIcon (szProgramFolder, szItemName , szCommandLine, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag); szProgramFolder = FOLDER_DESKTOP; LongPathToQuote (szCommandLine, TRUE); if (SprintfBox (OK | CANCEL, "please select:", "% s", "would you like on your desktop ? create a shortcut to it ") == 6) then AddFolderIcon (szProgramFolder, szItemName, szCommand Line, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag); endif; szProgramFolder = FOLDER_PROGRAMS ^ SHELL_OBJECT_FOLDER; szItemName =" re adme "; szProgram = WINDIR ^" notepad.exe "; szParam = TARGETDIR ^" readme.txt "; LongPathToQuote (szProgram, TRUE); LongPathToShortPath (szParam); szCommandLine = szProgram " " szParam; AddFolderIcon (szProgramFolder, szItemName, SZCommandline, SzworkingDir, SizConpath, 0, SzshortcutKey, NFLAG; NRESULT = CreateshellObjects (""); return nresult; end; actually this program is a app for AdDFoldericon. Apply AddFoldericon to add a program group, program item item or shortcut to the desktop desktop in the start menu. So first read the description of AddFoldericon is very necessary. It has eight entrance parameters.
The first parameter SZPROGRAMFolder is to determine the location (path) to add a monitator to Win95, such as "C: // Windows // StartMenu // Programs // Accessories // Games". In Windows95 and WinNT4.0, you can also use the system's macro definition: folder_desktop (Add on the desktop), Folder_Desktop (add in the start menu), Folder_Programs (add in the start -> program order), etc. The second parameter is SziteMname, that is, the name of the added icon (the name of the application). The third parameter SZCommandline is relatively cumbersome. It intends to specify the executable and its command line, or the full path under the subdirectory (only for Windows 95 & WinNT4.0). Szworkingdir is a working path, which is empty: "", or Targetdir (Target path). SizConPath is an icon path, which is generally set to empty: "" ". NICON is the number of icons, that is, if the application has several icons, you want to display that, in turn is 0, 1, 2 .... SzshortcutKey is used to define shortcuts. NFLAG is used to specify the appearance of the icon. If you contain a long path name in the path, you must use '' or "" to include it with the longpathToQuote function. When used for 16-bit WIN31 and WINNT3.5, it should also call longpathtoshortpath for conversion. This can create a program group, program item or shortcut. Too much trouble? It doesn't matter, if you think this piece of operation is troubles, you can be skilled, go to Resource, please see it later. (2) Function setupscreen () begin enable (fullwindowmode); Enable (IndvFileStatus); SetTitle ("Ophthalmology Multi-function Processing System Setup", 28, Yellow); // Modify Font and Color SetTitle ("Ophthalmology Multi-Function Handling System" , BACKGROUNDCAPTION; // Title line font and color enable (Background); delay (1); end; this is mainly the application of Settitle (Szstring, NpointSize, ncolor) function. The three parameters represent the contents of the written string, the font size, and the color of the text, respectively. (3) Function Dialogshowsdwelcome () Number Nresult; String Sztitle, Szmsg; Begin Sztitle = "Welcome"; SZMSG = "Welcome to the Ophthalmology Multi-Function System Setup!"; NRESULT = SDWELCOME (SZTITLE, SZMSG); Return Nresult End; written in this function to the title of your program.
(4) function SetupRegistry () NUMBER nResult; STRING szKey, szNumName, szNumValue, svNumValue; NUMBER nType, nSize; begin szKey = "Robert // RobertSoftware // Spirit // Version"; // own primary key szNumName = "TestValue" // key name SZNUMVALUE = "12345"; // key value NTYPE = regdb_number; // Type nsize = -1; // Specify size regdbsetKeyValueex (Szkey, Sznumname, NTYPE, SZNUMVALUE, NSIZE); // Create NResult = CreateREGISTRYSET (""); Return nresult; end; modify the registry through this method, then supplemented by some algorithms, you can put small but play a good encryption program, you may wish to try! ? (5) function DialogShowSdFinishReboot () NUMBER nResult, nDefOptions; STRING szTitle, szMsg1, szMsg2, szOption1, szOption2; NUMBER bOpt1, bOpt2; begin then bOpt1 = FALSE if (BATCH_INSTALL!); // not vote bOpt2 = FALSE; // No szmsg1 = "% P installed end! / N"; //% P represents the name of the installer. SZMSG2 = "End by the end key is installed."; // Tips information szoption1 = "I want to see the readme file."; szoption2 = "I want to run the program now."; NRESULT = SDFINISH (Sztitle, Szmsg1, Szmsg2, Szoption1, Szoption2, Bopt1, Bopt2); if (Bopt1) Then Launchappandwait (Windir ^ "Notepad.exe", Targetdir ^ "Readme.txt", Wait); // If check, the notebook calling Windows is loaded into the readme file. Endif; if (bopt2) Then Launchapp (Targetdir ^ 'Eye95.exe', ""); // In the selected, execute the application ENDIF; RETURN 0; endif; ndefoptions = sys_bootmachine; sztitle = ""; szmsg1 = "" SZMSG2 = ""; NRESULT = SDFINISHREBOOT (SZTITLE, SZMSG1, NDEFOPTIONS, SZMSG2, 0); // This control determines whether to restart the computer. RETURN NRESULT; END; This program is installed to the end, you can prompt whether the user will look at the readme file, start the program immediately, restart the computer. Scripts is most needed to change may be these five places. Others should be modified according to the needs of the maker's own.