premm
13th December 2003 09:01 UTC
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
Afrow UK
13th December 2003 10:51 UTC
You might want to upgrade to b4 and see if that fixes the problem.
-Stu
premm
13th December 2003 11:19 UTC
thanks, but does anyone know that this bug is fixed in B4 ?
kichik
13th December 2003 13:04 UTC
I know no such bug. Please attach the entire script.
premm
13th December 2003 13:09 UTC
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
kichik
13th December 2003 13:29 UTC
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.
premm
13th December 2003 14:33 UTC
thank you,
i'll try that!