Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   NSIS extracting in wrong folder instead of overwrite/skip (http://forums.winamp.com/showthread.php?t=247692)

jeisan 2nd June 2006 18:21

NSIS extracting in wrong folder instead of overwrite/skip
 
1 Attachment(s)
Hi, i need a little help, im doing an install for a oracle runtime, it mess with registries and reg diles and another setups extracted to a temp file.

in that there is no problem i did everything reading the forums but now in the UAT.

i found the next problem.

When i install the first time it creates the folders as i told it. ie.

C:\oracle\forms
This is mis $INSTdir

and inside it it have several folders like BIN
C:\oracle\forms\bin

but after it finish i decide to reinstall it without uninstall it to see what it doest and i realize that the installations was not skipping or overwriting so i decide to dig a little and i found the next.

in the 2nd. install i found inside the BIN folder a identical structure as it was the instdir
so in exemple

inside C:\oracle\forms\bin
i found another bin
C:\oracle\forms\bin\bin
and in here i find all the files of the installation.

i checked and i dont find where to look to fix this error.
could it be when in compiled ? or a bad directory that i wrote.

here are some parts of my code.
Quote:

OutFile "Setup.exe"
InstallDir "c:\oracle\forms"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
Quote:

Section "Runtime" SEC02
SetOutPath "$INSTDIR\BIN"
SetOverwrite try
File "C:\oracle\Forms\BIN\CA60.DLL"
File "C:\oracle\Forms\BIN\CORE40.DLL"
File "C:\oracle\Forms\BIN\D2SC60.DLL"
File "C:\oracle\Forms\BIN\D2SCV60.EXE"
File "C:\oracle\Forms\BIN\DE60.DLL"
File "C:\oracle\Forms\BIN\DEB60.DLL"
....
if someone could help me with some tip to fix this it would be really appreciated.

Thanks.

ps. i attached a composed image of 2 explorer windows so you can see what im talking.

Afrow UK 2nd June 2006 18:33

It would be handy if you could attach your script.

-Stu

jeisan 2nd June 2006 18:59

1 Attachment(s)
sure

here it is.

Regards

Afrow UK 2nd June 2006 19:45

I think this might be the problem.
You are using:
code:
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""


However, when you write to it after installation (in Section -Post), your code is:
code:
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\BIN\D2SCV60.EXE"


Should be:
code:
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" $INSTDIR


Just a question... was it not possible to use File /r instead of including each and every file individualy?

-Stu

jeisan 2nd June 2006 20:02

mh im have not so much expertise in nsis, first project and was this let me change that, mhh let me check with the file /r to see what can i do.

i will post the result thanks.

Afrow UK 2nd June 2006 20:08

If you want to compress a folder, use:
SetOutPath $INSTDIR
File /r "local_folder\*.*"

This will extract all files in local_folder to $INSTDIR.

Similarly:
SetOutPath $INSTDIR
File /r "local_folder"

This will extract local_folder and its contents to $INSTDIR.

-Stu

jeisan 3rd June 2006 01:45

yes thanks. that worked i just needed to remove the value in the registry since it was saved from the last install.
but after that it worked

Great. thanks.


All times are GMT. The time now is 04:58.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.