q0987
13th March 2005 03:39 UTC
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
mrtech
13th March 2005 04:31 UTC
Only include "File" in install section, use ExecWait in uninstall section.
q0987
13th March 2005 06:55 UTC
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
mrtech
13th March 2005 07:51 UTC
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'
q0987
13th March 2005 13:07 UTC
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
mrtech
13th March 2005 14:46 UTC
Try this instead, just remove the "File" line.
Section "un.Delete App" unDelApp
ExecWait '"$INSTDIR\setup.exe" /x' $0
Delete "$INSTDIR\setup.exe"
SectionEnd