Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 31st January 2004, 19:08   #1
New_Installer
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
New_Installer is offline   Reply With Quote
Old 31st January 2004, 19:14   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Reply
Go Back   Winamp 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