.
NSIsOfUser ManualChapter 2"Tutorial: the BasicThis describes the structure of the script.
Required 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. Be
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
One, NSIs error what meaning
System error prompts English as "Installer integrity check has failed. Common causes include incomplete download and damaged media. Contact the installer are author to obtain a new copy,
Translation: Start the program at the beginning of the system for the integrity of the installer was tested, but the result is that the installer source is not complete or corrupted, because of this reason Windows blocked the program to
Wife used his own WIN7 system for some time, has been said that the system is getting slower, let me help her reload the system. All right, then reload the order. Luckily, I backed her up with a ghost after installing WIN7. Shutdown, GHOST, wait 6 minutes ... OK, installation is complete. Then is to install the prerequisite software, what 360 Ah, QQ Ah, Sogou Input method ah. But the problem is, no matter what software I install, always reported "NSIs
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
0FunctionEnd Check that Flighty.exe is running when uninstalling starts:Function Un.oninit MessageBox mb_iconquestion" Are you sure you want to completely remove $ (^name), and all of its components?" " idyes +2 Abort ; detect if the program is running "flighty.exe " Pop $R 0 1 0 no_run " Uninstaller detects ${product_name} is running, please close before uninstalling!" " Quit no_run:functionendIncidentally: If your program has been killed by 360, you can use this to prompt th
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
;----------
Found on the Internet:
No matter what software I install, always report "NSIs Error:" Error writing temporary file. Make sure your the Temp folder is valid. "" This error, see figure below.
However, if I move the software to the system disk (c disk) for installation (which is always installed in D disk), there is no problem that can be installed. MD, what's the problem? Start Google, saying that it is possible that the TEMP and TMP folders specified
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
Today, a colleague asked me a question. After installing the program using the program installation package provided by me, I found that the created application shortcut property form contains a [start position (s ):] There is a problem with the
In Urlmon.dll there is a function called Urldownloadtofile, as the name implies, is a download file of things, we do online installation or many other times, often need to download some small files in advance to configure the current program will be
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.