|
|
#1 |
|
Junior Member
Join Date: May 2005
Posts: 6
|
Self copy install ?
Is there a way to make the install file copy itself after installation into the install dir ?
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
|
code: |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2005
Posts: 6
|
but what if the user renamed the file ?
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
|
System plugin can help you to detect filename
code: After this call $R0 will be equal to full path of file (i.e. path and file-name). Parse this variable. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: May 2005
Posts: 6
|
wow!
thanks :D but I'm new to this scripting system so I'm not sure how to combine those two scripts to make it work :P |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
|
I think this may be like this:
code: Add: Forgotten: GetParent function you can take from NSIS-docs - Appendix C - Get parent directory. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: May 2005
Posts: 6
|
You R AMAZING!!!
I O U a HUGE beer
|
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Rather than use GetParent to get the file name (for some reason) just use GetFileName:
http://nsis.sourceforge.net/archive/...ances=0,11,211 code: Edit: Silent may not be wise if the installer is large. -Stu |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: May 2005
Posts: 6
|
hmmm... OK :] I'll try it then...
|
|
|
|
|
|
#10 | |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Why use GetParent or GetFileName? CopyFiles works with full paths, it's even required:
Quote:
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
|
#11 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
He needed the installer file to be copied to $INSTDIR.
GetFileName was used to get the installer file name from $R0. -Stu |
|
|
|
|
|
#12 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Right... Sorry, my bad.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: May 2005
Posts: 6
|
the script works great ! nothing more to add :] thank you all for your help !!!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|