Archive: Some files are copied to c:\ instead to the install dir


Some files are copied to c:\ instead to the install dir
Its strange, some useres report that DeskCalc.exe file was sent to root directory (c:\), but the uninstall programs (Uninstall.exe and uninst-nsis.exe) were sent to the right directory (c:\Program Files\DeskCalc Pro) along with the help subdirectory (French and English help files).

Here's the script, can anybody help me with this, i'am using 2.0Beta3

Thank you
Mario

;--------------------------------
;Installer Sections

Section "Deskcalc.exe" SecCopyUI

;Add your stuff here
SetOutPath "$INSTDIR"

File "lizenz.txt"
File "f:\Projects\DeskCalc.uk\TaxCalc___Win32_Release_englisch\deskcalc.exe"
File "f:\PROJECTS\DeskCalc.uk\Taxcalc.bat"
File "f:\PROJECTS\DeskCalc.uk\wait.exe"

SetOutPath "$INSTDIR\HELP"
File "f:\PROJECTS\DeskCalc.uk\help\deskcalc_uk.chm"
File "f:\PROJECTS\DeskCalc.uk\help\deskcalc_fr.chm"
File "f:\PROJECTS\DeskCalc.uk\help\deskcalc_basics.swf"
File "f:\PROJECTS\DeskCalc.uk\help\deskcalc_basics.html"

;Add your stuff here
WriteUninstaller "$INSTDIR\Uninstall.exe"

SetOutPath "$INSTDIR"

SectionEnd


You might want to upgrade to b4 and see if that fixes the problem.

-Stu


thanks, but does anyone know that this bug is fixed in B4 ?


I know no such bug. Please attach the entire script.


here it is, its really strange, this problem happens only on some
machine. i haven't seen that myself, so i cannt reproduce it.

script is attached !

thanks
mario


You have some errors in your script. You have mixed code from makensis.nsi with your own code. You write to the NSIS registry key instead into your own:

WriteRegStr HKLM SOFTWARE\NSIS "" $INSTDIR
You create uninst-nsis.exe again after you've created Uinstall.exe:
WriteUninstaller $INSTDIR\uninst-nsis.exe
And you still read $INSTDIR from your own registry key though you don't write anything there:
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
Those users probably had a previous installation of your product which wrote something to that registry key on its own. NSIS probably read that key, got the wrong directory from and installed the files in there. The wrong directory in their case was the root directory.

You also get the desktop dirctory using the wrong method. You should use $DESKTOP and not $SMPROGRAMS\..\.. which might not always work. You also forgot to quote the paths in ExecShell.

Try the attached file with b4 or the latest CVS version.

thank you,

i'll try that!