Archive: How do i get installer to


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..

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


a) Copy a folder if the user selected? :confused: 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.


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


File /r

Stu


The run of the file is not working....


What exactly happens? Please be more specific.

Stu


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


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.


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?


Assuming that the file isn't in use SetOverWrite on should do the job as expected.


Where/how do i place that??


http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.2.8


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..


`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.


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


See the Modern UI examples for how to add descriptions.

Stu