Archive: Setup doesn't work properly


Setup doesn't work properly
I create the following simple script, that (in silent mode, as you can see) update some file while they are working, so that they would be ready to use on the next reboot.
I have compiled the script, so that I obtained the setup correctly.
I tried to launch the setup on my PC (with Win XP pro) and it works fine (create the installation directory with the file as listed). It also makes the Install.log, which I previously set to ON, boot on the code (NSIS_CONFIG_LOG) and on the script.
I have 50 machine with XPembedded Operating System (they have all the same image inside, so they are identical), on which I have my application to be upgraded with this setup,
and I noticed a strange behaviour: in fact ONLY ON SOME OF THEM, if I double click on the setup icon, it does not do nothing! Also the Install.log is not created!
If I rename the directory containing the file to be updated, and launch the setup, it will create the new dir with the new files inside (and the install.log too), but if I relaunch the same setup, it doesn't work any more, and it doesn't create (update) the install.log file too!

Has someone any ideas or suggestion for this strange case?
Thanks in advance!
Aps


!define PRODUCT_NAME "MySetup"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "bla"
!define PRODUCT_WEB_SITE "http://www.bla.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\MyProj.exe"

SetCompressor lzma

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "MySetup.exe"
InstallDir "C:\Dir1\Dir2\MySetup"
Icon "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
SilentInstall silent
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""

Section "MyProj" SEC01
Logset on
SetOutPath "C:\Dir1\Dir2"
Rename $INSTDIR\MyProj.exe $INSTDIR\MyProj_old.exe
Delete /REBOOTOK $INSTDIR\MyProj_old.exe
Rename $INSTDIR\Pippo.dll $INSTDIR\Pippo_old.dll
Delete /REBOOTOK $INSTDIR\Pippo_old.dll
SetOverwrite ifdiff
File "..\MyProj.exe"
File "..\Pippo.dll"
File "..\Pluto.dll"
SectionEnd


Maybe something writes to the registry value in ${PRODUCT_DIR_REGKEY} and changes the installation directory. Try running it with Filemon to see which files it's working with.


Thanks a lot for the suggestion! Now I'm going to use FileMon...

If I use the wizard to make the setup, it introduces the following lines in the script created:

Section -Post
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "C:\dir1\dir2\MyProj.exe"
SectionEnd

What does it mean?
I didn't use it in my previous script...is it necessary?

Thanks for the help!
Aps


It writes the installation directory into the registry so InstallDirRegKey will use it the next time the user runs the installer. However, it should write $INSTDIR and not an hard-coded path.