|
|
#1 |
|
Junior Member
Join Date: Jan 2004
Posts: 2
|
Loding files with invisible installer
Greetings
I´m new to using the NSIS installer and I was wondering how image files or sound files can be loaded with the script. I can add an image file to the script, but, it only knows to look for it on my hard drive and not on the potential user´s hard drive. I´ve used this code to load a temp IE Explorer file: GetTempFileName $R0 FileOpen $0 $R0 "w" ;open htmltemp file in windowed mode. ;backslash to continue with the same line and omit ;html double quotes. They throw an error when compiling. FileWrite $0 "<HTML>\ <BODY BGCOLOR=#00FF99>\ <H1>THIS THAT AND THE OTHER STUFF#1</H1>\ <H1>Pertaining to this, that or the other, actually</H1>\ <p>Blah blah blah!\ <br>until the cows come home\ <br>to root!</p>\ <H4>More stuff goes here and there</H4>\ <br>\ <IMG SRC=file://C|/mainimagefolder/logo/logo1.gif WIDTH=320 HEIGHT=240 ALT=Try the Power of this now! BORDER=0>\ <br><A HREF=http:\\www.mycompany.html>Click here to get the Latest version!</A>\ </BODY>\ </HTML>" FileClose $0 ;By the way, the above code compiles just fine, as long as ;thye final EXE knows where the image file is on my hard ;drive. If the final EXE can´t find the image, it will just show that little infamous "x" in it´s place along with the text and hyperlink when the user clicks on the final EXE icon. ;Sorry for the questions and thank you for the reply. New_Installer |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Use the File instruction to extract files. See the examples in the Examples folder.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|