Talk:Add uninstall information to Add/Remove Programs: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by 2 users not shown)
Line 18: Line 18:
  SectionEnd
  SectionEnd


== ivory towers intelligent dating reviews ==
== Computing EstimatedSize, Method 2. ==


online world wide adults dating personals http://loveepicentre.com/taketour.php oregon internet dating
Make sure you ClearErrors when using the GetInstalledSize function to compute the EstimatedSize, otherwise the loop will end prematurely. You can also ClearErrors in the function itself.

Latest revision as of 02:44, 8 December 2013

I wanted to submit this, but didn't want to edit the article since I'm new here.

Use ${GetSize} to fill in the EstimatedSize value. This assumes the simple case where there is one main directory with most of your files (including subdirs).

Just the relevant bits of foo.nsi :

!define ARP "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
!include "FileFunc.nsh"

Section "Install"

; [...copy all files here, before GetSize...]

${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$0"

SectionEnd

Computing EstimatedSize, Method 2.

Make sure you ClearErrors when using the GetInstalledSize function to compute the EstimatedSize, otherwise the loop will end prematurely. You can also ClearErrors in the function itself.