Tool integration-compiler integration examples (Java, Borland C ++, Visual C ++, Inno Setup, NSIs)On the "Tools> Parameter Selection> User Tools" option page, set steps① Set the group name. You can leave it unspecified here.② Click "add tool> application" and make the following settings③ Various parameters similar to "$ (filepath)" can be obtained from the arrow drop-down menu on the right of the text box. The specific meanings are as follows:Paramete
The NSIs-generated installer is a 32-bit application, so when running in x64, the installed file will be automatically redirected, such as installing to C: files in the \ windows \ system32 directory will be installed in the c: \ windows \ syswow64 directory. This is inconvenient for some software. One way is to re-compile the NSIs code to 64-bit, which is a little troublesome and requires a lot of time for
How to compile NSIS User-Defined Interface scripts
Almost two Windows 8 and windows 10 Operating Systems launched by Microsoft Use Wizard interface styles. In fact, Modern UI (new user interface) has similar interface styles, if you want to design a welcome page, you can add options such as installation introduction and immediate execution on the page. Next, let's take a look at its implementation code.
; NSIS
is the OUTFILE instruction, which tells NSIs where to write the installer, and one section.
That is to sayNSIOnly one scriptOUTFILECommand and oneSectionYou can. This is what it looks like:
OUTFILE"Min.exe"
Section
Sectionend
Nothing to doInstallerThis is all done. However, this example isNSIThe script has no help at all. Because what we need is an installer that can complete basic functions, rather than a"Hello WorldNo executable f
NSIs commonly used callback functions
NSIs commonly used callback functions Onguiinit onInit oninstfailed oninstsuccess onguiend onmouseoversection onrebootfailed onselchange Onuserabort onverifyinstdir unguiinit unoninit unonuninstfailed unonuninstsuccess unonGUIEnd unonRebootFailed Unonuserabort
Note: For specific use examples, see the Nsis.chm Help documentation Onguiinit:
The callback will be called b
NSIs: An Example of judging and installing. NET Framework
Currently, software developed by. NET is widely used, but some operating systems do not meet the running requirements of the software. Therefore, we need to installProgram. NET Framework. If it does not meet the requirements, install it silently.
First, we will judge the current. Net version in the function section:
Function getnetframeworkversion; Obtain the. NET Framework version. Support
This is some commonly used NSIs code, less frivolous deliberately sorted out, convenient for everyone to view the use at any time. Update not regularly oh ~ ~ ~ "From: http://www.flighty.cn/html/bushu/20120827_156.html"
1
; Get the operating system drive letter
2
Readenvstr $R 0 systemdrive
3
Original link http://www.flighty.cn/html/bushu/20110402_115.htmlIf the program that we are installing or upgrading is running, the file will definitely replace the failure, and the following code can prompt the user to end the running program.Need to use plugin FindProcDLL.dll, download path: http://nsis.sourceforge.net/FindProcDLL_plug-inHttp://files.cnblogs.com/files/z5337/FindProc.zipHttp://files.cnblogs.com/files/z5337/KillProcDll%26FindProcDll.zipCheck that Flighty.exe is running when you s
This problem happened when I visited the csdn Forum in December. At that time, I was curious about why the landlord wanted to hide the close button and asked me the answer. As a result, the landlord had abandoned the building and did not give the reason, I guess it may be to make custom page beautification and cannot change the appearance of the new button. Later I thought it would be easier to modify the window style. Here I use the getwindowlong and setwindowlong APIs.
Function onguiinitSyste
NSIs check disk space is insufficient, reproduced from: http://stackoverflow.com/questions/989172/how-can-i-check-free-space-during-a-nullsoft-silent-install
! Include filefunc. nsh
MemoThe end
section-.netframework; detection is required. Netframework version Call getnetframeworkversionpop $R 1;${if} $R 1 NSIs detecting the. NET framework and downloading it online
(Interested users may wish to copy the following code into the NSIs plug-in to run a look)
/*
If you are have this effects,please keep!
Writer: "Mr.z_production JUAN "
http://blog.163.com/53_54
Thanks:restools,zhfi,x-star
*/
! Addplugindir "."
! Addincludedir "."
!include Mui2.nsh
; --------------------------------------------------
; General settings.
Name "Flame_effects Example"
OutFile "Nsis_fire.exe"
Setcompressor/solid Lzma
Reserve
Microsoft's nearly two operating systems, Windows 8 and Windows 10, use the wizard interface style, in fact, the modern UI (new user interface) with this similar interface style, if the user design a welcome page, you can add the installation introduction, whether immediately to execute options. Let's take a look at its implementation code below.
; NSIs Modern User Interface
; Basic Example Script
; Written by Joost Verburg
;----------
When writing NSIs packaging scripts, we often need to test whether some of the methods are feasible. Just like we're writing code, for example, printing some constant values and testing for things like we expected.
I never knew how to test the output of some operations individually.
Loadlanguagefile "${nsisdir}\contrib\language FILES\SIMPCHINESE.NLF"
showinstdetails show #显示调试信息打印窗口
OutFile "Test.exe"
Name "test" section
"test"
detailprint "appd
NSIs Untitled window Movement
After the previous few, we loaded the background image, removed the original borders, controls, etc., and you found that when the mouse clicked on the window title bar, the window cannot be moved. Next, look at how our window implements the window movement. The subtext of the untitled move is to pass the message that was originally passed to the title bar to the title bar through your defined element callback, so just ad
automatically created.
Commands for detaching segments:Deleteregkey [/ifempty] root key sub-KeyDelete a registry key. If/ifempty is specified, the registry key is deleted only when it has no sub-Key (otherwise, the entire registry key is deleted ). Valid root key values are listed in the following writeregstr. If the key cannot be deleted (or if it does not exist), an error mark is placed.
3: setoutpath output path
Set the output path ($ outdir) and
error occurs, proving that the input of parameters such as the account and password is incorrect. This is a simple check. A safer operation is to read result.txt. File. If the 3rd rows are displayed as OK, the connection is normal and an SQL statement is run smoothly. Pop $0 StrCmp $0 0 passMessageBox MB_ OK "connection error. Enter the connection information again. Otherwise, subsequent operations cannot
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.