Old 9th February 2011, 15:47   #1
frohlinger
Junior Member
 
Join Date: Feb 2011
Posts: 4
Unhappy Files disappearing once installation is complete

Hi,

Below is my small NSIS script (I omitted the uninstallation section).

There are 5 files that disappear (!) immediately after the installation completes.
I have no idea why...
I see them in the program files directory while the installation is running, but when it finishes - all files are deleted, while all the rest remain.
These are new files I've added today to my existing NSIS installation.

BTW, If I rename the files and add the PRODUCT_VERSION to them - they are not deleted.
But I do NOT want to version them...

The "disappearing" files are:
RemoveTabs.exe
abouttabs.htm
search.gif
search_bg.gif
search_bg_color.gif

What am I missing here?
Best,
Gabriela



!define PRODUCT_VERSION "1.0.9"
!define PRODUCT_NAME "GRAZEit.IE.Plugin"
Name "${PRODUCT_NAME}"
OutFile "${PRODUCT_NAME}.${PRODUCT_VERSION}_home.exe"
InstallDir "$PROGRAMFILES\IE.Plugin"
!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
AutoCloseWindow true

Section "Files"
SetOutPath "$INSTDIR"

File "/oname=HomeInstaller.${PRODUCT_VERSION}.exe" "bin\HomeInstaller.exe"
File "/oname=PreInstaller.${PRODUCT_VERSION}.exe" "bin\PreInstaller.exe"
File "/oname=PostInstaller.${PRODUCT_VERSION}.exe" "bin\PostInstaller.exe"
File "/oname=PostUnInstall.${PRODUCT_VERSION}.exe" "bin\PostUnInstall.exe"
File "bin\login.png"

File "bin\RemoveTabs.exe"
File "abouttabs\abouttabs.htm"
File "abouttabs\search.gif"
File "abouttabs\search_bg.gif"
File "abouttabs\search_bg_color.gif"

execwait "$INSTDIR\HomeInstaller.${PRODUCT_VERSION}.exe"
execwait "$INSTDIR\PreInstaller.${PRODUCT_VERSION}.exe" $0

File "/oname=giInternetExplorer.${PRODUCT_VERSION}.dll" "bin\giInternetExplorer.dll"
File "/oname=giWindow.${PRODUCT_VERSION}.dll" "bin\giWindow.dll"

RegDll "$INSTDIR\giInternetExplorer.${PRODUCT_VERSION}.dll"

WriteUninstaller $INSTDIR\uninstaller.exe
WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayName" "${PRODUCT_NAME}"
WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayIcon" "$INSTDIR\uninstaller.exe"
WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr HKLM "${REG_UNINSTALL}" "Publisher" "GRAZEit"
WriteRegDWord HKLM "${REG_UNINSTALL}" "NoModify" 1
WriteRegDWord HKLM "${REG_UNINSTALL}" "NoRepair" 1
WriteRegStr HKLM "${REG_UNINSTALL}" "UninstallString" '"$INSTDIR\uninstaller.exe"'

exec '"$INSTDIR\PostInstaller.${PRODUCT_VERSION}.exe" ${PRODUCT_VERSION}'
SectionEnd
frohlinger is offline   Reply With Quote
Old 10th February 2011, 08:32   #2
Highcoder
Member
 
Join Date: Jan 2011
Posts: 69
Quote:
File "bin\RemoveTabs.exe"
File "abouttabs\abouttabs.htm"
File "abouttabs\search.gif"
File "abouttabs\search_bg.gif"
File "abouttabs\search_bg_color.gif"
Strange...

Maybe you should use full paths like "C:\mysetupfiles\abouttabs\search_bg_color.gif".
Or the postinstaller do something with this files...

When renaming works for you then "rename" it ;-)

Quote:
File "/oname=search_bg_color.gif" "abouttabs\search_bg_color.gif"
Highcoder is offline   Reply With Quote
Old 10th February 2011, 08:50   #3
frohlinger
Junior Member
 
Join Date: Feb 2011
Posts: 4
Red face

Oh my good.... you're right.
I had a DeleteFile in the postinstaller removing files that are not versioned, in order to perform clean upgrades....
All is good now. Thank you!!!
frohlinger is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
disappear, files, installation, nsis, versioning

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump