Old 13th March 2005, 02:39   #1
q0987
Junior Member
 
Join Date: Mar 2005
Posts: 21
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
q0987 is offline   Reply With Quote
Old 13th March 2005, 03:31   #2
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
Only include "File" in install section, use ExecWait in uninstall section.
mrtech is offline   Reply With Quote
Old 13th March 2005, 05:55   #3
q0987
Junior Member
 
Join Date: Mar 2005
Posts: 21
Quote:
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
q0987 is offline   Reply With Quote
Old 13th March 2005, 06:51   #4
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
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'
mrtech is offline   Reply With Quote
Old 13th March 2005, 12:07   #5
q0987
Junior Member
 
Join Date: Mar 2005
Posts: 21
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
q0987 is offline   Reply With Quote
Old 13th March 2005, 13:46   #6
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
Try this instead, just remove the "File" line.

Section "un.Delete App" unDelApp
ExecWait '"$INSTDIR\setup.exe" /x' $0
Delete "$INSTDIR\setup.exe"
SectionEnd
mrtech is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump