Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th May 2007, 10:43   #1
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
How do i get installer to

How do i get the installer to copy a folder if selected...

Says an error with the line:
File "plugin"


And how do i get the installer to run a batch file lets say during installation or after....

Because i have something to add to registary..

code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Battle.net\Configuration]
"Diablo II Battle.net gateways"=hex(7):31,00,30,00,30,00,32,00,00,00,30,00,35,\
00,00,00,75,00,73,00,77,00,65,00,73,00,74,00,2e,00,62,00,61,00,74,00,74,00,\
6c,00,65,00,2e,00,6e,00,65,00,74,00,00,00,38,00,00,00,55,00,2e,00,53,00,2e,\
00,20,00,57,00,65,00,73,00,74,00,00,00,75,00,73,00,65,00,61,00,73,00,74,00,\
2e,00,62,00,61,00,74,00,74,00,6c,00,65,00,2e,00,6e,00,65,00,74,00,00,00,36,\
00,00,00,55,00,2e,00,53,00,2e,00,20,00,45,00,61,00,73,00,74,00,00,00,61,00,\
73,00,69,00,61,00,2e,00,62,00,61,00,74,00,74,00,6c,00,65,00,2e,00,6e,00,65,\
00,74,00,00,00,2d,00,39,00,00,00,41,00,73,00,69,00,61,00,00,00,65,00,75,00,\
72,00,6f,00,70,00,65,00,2e,00,62,00,61,00,74,00,74,00,6c,00,65,00,2e,00,6e,\
00,65,00,74,00,00,00,2d,00,31,00,00,00,45,00,75,00,72,00,6f,00,70,00,65,00,\
00,00,36,00,36,00,2e,00,31,00,30,00,39,00,2e,00,31,00,38,00,2e,00,32,00,32,\
00,38,00,00,00,2d,00,35,00,00,00,44,00,32,00,50,00,4b,00,00,00,00,00
"Battle.net Gateways"=hex:31,30,30,31,00,30,31,00,75,73,77,65,73,74,2e,62,61,\
74,74,6c,65,2e,6e,65,74,00,38,00,55,2e,53,2e,20,57,65,73,74,00,75,73,65,61,\
73,74,2e,62,61,74,74,6c,65,2e,6e,65,74,00,36,00,55,2e,53,2e,20,45,61,73,74,\
00,61,73,69,61,2e,62,61,74,74,6c,65,2e,6e,65,74,00,2d,39,00,41,73,69,61,00,\
65,75,72,6f,70,65,2e,62,61,74,74,6c,65,2e,6e,65,74,00,2d,31,00,45,75,72,6f,\
70,65,00,00



[HKEY_CURRENT_USER\Software\Battle.net\Configuration]
"Diablo II Battle.net gateways"=hex(7):31,00,30,00,30,00,32,00,00,00,30,00,35,\
00,00,00,75,00,73,00,77,00,65,00,73,00,74,00,2e,00,62,00,61,00,74,00,74,00,\
6c,00,65,00,2e,00,6e,00,65,00,74,00,00,00,38,00,00,00,55,00,2e,00,53,00,2e,\
00,20,00,57,00,65,00,73,00,74,00,00,00,75,00,73,00,65,00,61,00,73,00,74,00,\
2e,00,62,00,61,00,74,00,74,00,6c,00,65,00,2e,00,6e,00,65,00,74,00,00,00,36,\
00,00,00,55,00,2e,00,53,00,2e,00,20,00,45,00,61,00,73,00,74,00,00,00,61,00,\
73,00,69,00,61,00,2e,00,62,00,61,00,74,00,74,00,6c,00,65,00,2e,00,6e,00,65,\
00,74,00,00,00,2d,00,39,00,00,00,41,00,73,00,69,00,61,00,00,00,65,00,75,00,\
72,00,6f,00,70,00,65,00,2e,00,62,00,61,00,74,00,74,00,6c,00,65,00,2e,00,6e,\
00,65,00,74,00,00,00,2d,00,31,00,00,00,45,00,75,00,72,00,6f,00,70,00,65,00,\
00,00,36,00,36,00,2e,00,31,00,30,00,39,00,2e,00,31,00,38,00,2e,00,32,00,32,\
00,38,00,00,00,2d,00,35,00,00,00,44,00,32,00,50,00,4b,00,00,00,00,00
"Battle.net Gateways"=hex:31,30,30,31,00,30,31,00,75,73,77,65,73,74,2e,62,61,\
74,74,6c,65,2e,6e,65,74,00,38,00,55,2e,53,2e,20,57,65,73,74,00,75,73,65,61,\
73,74,2e,62,61,74,74,6c,65,2e,6e,65,74,00,36,00,55,2e,53,2e,20,45,61,73,74,\
00,61,73,69,61,2e,62,61,74,74,6c,65,2e,6e,65,74,00,2d,39,00,41,73,69,61,00,\
65,75,72,6f,70,65,2e,62,61,74,74,6c,65,2e,6e,65,74,00,2d,31,00,45,75,72,6f,\
70,65,00,00


XxXGoD is offline   Reply With Quote
Old 25th May 2007, 13:58   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,896
a) Copy a folder if the user selected? Do you mean copy files from user's folder selection?

b) You use nsis native registry functions to add those entries. If you wish not, then you should call Exec instruction to invoke regedit with silent switch /s.


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 25th May 2007, 14:32   #3
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
I am making it install to a folder, i want a whole folder to be copyed or a folder to be made in the installation folder then each file to be copied there...

what u said doesnt make much sence, i started learning today...

So how would i call the file: server.reg

or if need be call a batch file... so .bat
XxXGoD is offline   Reply With Quote
Old 25th May 2007, 16:02   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
File /r

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th May 2007, 16:42   #5
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
The run of the file is not working....

Last edited by XxXGoD; 25th May 2007 at 17:34.
XxXGoD is offline   Reply With Quote
Old 25th May 2007, 18:11   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
What exactly happens? Please be more specific.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th May 2007, 19:05   #7
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
Nothing happens, i know when the registry file has been done... cos i can load game and see if server added

EDIT: i got it working now i used:

Function .onInstSuccess
Exec server.bat
FunctionEnd
XxXGoD is offline   Reply With Quote
Old 25th May 2007, 19:44   #8
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Exec Server.bat brings up the console window which might look kinda weird, recommended to use nsExec for an unattended by the end user batch execution.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 25th May 2007, 20:04   #9
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
Hmm okay.

Its all working good now, BUT

with: File "Game.exe"

if i allready have that file in there it doesnt overright i dont think... how can i tell if it does?
XxXGoD is offline   Reply With Quote
Old 25th May 2007, 20:08   #10
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Assuming that the file isn't in use SetOverWrite on should do the job as expected.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 25th May 2007, 20:32   #11
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
Where/how do i place that??
XxXGoD is offline   Reply With Quote
Old 25th May 2007, 21:40   #12
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.2.8

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 25th May 2007, 21:55   #13
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
SO is this correct?



SetOverwrite on
File "Game.exe"
File "D2Gdi.dll"
File "D2gfx.dll"
File "D2Glide.dll"

will it make them all set to overwrite..
XxXGoD is offline   Reply With Quote
Old 25th May 2007, 22:08   #14
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
`SetOverwrite on` is the default, so there's no need to use it, unless you use SetOverwrite in another place.

As for making it overwrite, yes it will. Just try and see.

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
Old 25th May 2007, 23:12   #15
XxXGoD
Member
 
Join Date: May 2007
Posts: 53
Ok, well With the compoent page...

it shows the compent but when i hover mouse over them doesnt show the info on it...

Section "C3PO"

SetOutPath $INSTDIR\C3PO

other than that problem its damn good now, thanks guys
XxXGoD is offline   Reply With Quote
Old 26th May 2007, 13:16   #16
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
See the Modern UI examples for how to add descriptions.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK 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