Archive: How to decrease the install file size?


How to decrease the install file size?
Hello all:

I met a problem and need some help.

1> use File /oname=$TEMP\aa.exe "i" to install application system
Delete "$TEMP\aa.exe"

2> use File /oname=$TEMP\aa.exe "x" to uninstall app system.

however I found NSIS double copy the file aa.exe to the final install.exe, so the install file is double size of the one i expected. because these two files are exactly the same why NSIS copy the same file twice.

how can i resovle this problem.

thank you
-daniel


Only include "File" in install section, use ExecWait in uninstall section.


Originally posted by mrtech
Only include "File" in install section, use ExecWait in uninstall section.
May you detail a bit about how to do it using Exec?Wait?

thank you very much!
-Daniel

In one of your section you put the file...
File /oname=$TEMP\aa.exe "MyInstallerUninstallerName"

Then:
ExecWait "$INSTDIR\MyInstallerUninstallerName"
; if this doesn't work try the next line
ExecWait "$TEMP\aa.exe"

In the "Uninstall" section you just put:
ExecWait "$INSTDIR\aa.exe"

If "i" and "x" are parameters then things are different, then the lines would be:

ExecWait '"$INSTDIR\MyInstallerUninstallerName" i'
; if this doesn't work try the next line
ExecWait '"$TEMP\aa.exe" i'

and to uninstall:
ExecWait '"$INSTDIR\MyInstallerUninstallerName" x'


hello mrtech:

I still have the same problem, probably I didn't follow your instructions correctly. I post my code here, so you might have time to check it out.

Section "Install APP" Installapp
File /oname=$TEMP\setup.exe "aa.exe"
ExecWait '"$TEMP\setup.exe" /i' $0
Delete "$TEMP\setup.exe"
SectionEnd

Section "un.Delete App" unDelApp
File /oname=$TEMP\setup.exe "aa.exe"
ExecWait '"$TEMP\setup.exe" /x' $0
Delete "$TEMP\setup.exe"
SectionEnd

NSIS used the above code and copied the aa.exe twice to the final installation file. I try to comment out one "File" command, but it doesn't work for me.


thank you for your help
-Daniel


Try this instead, just remove the "File" line.

Section "un.Delete App" unDelApp
ExecWait '"$INSTDIR\setup.exe" /x' $0
Delete "$INSTDIR\setup.exe"
SectionEnd