Old 10th February 2006, 20:08   #1
b0ggy
Junior Member
 
Join Date: Feb 2006
Posts: 1
Problem using NSIS for Pocket PC

Hi,
I try to make an installer, using NSIS, for Pocket PC. I need to install 2 cabs on PPC. When installing the second cab the installer delete the files that was installed from the first cab!

I'll copy the nsi and ini code here.

nsi file:

Name "veniceXplorer"
Icon "veniceXplorer.ico"
OutFile "veniceXplorer.exe"

LicenseText "You must agree to this license before installing."
LicenseData "eula.txt"

InstallDir "$PROGRAMFILES\veniceXplorer"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\hot dot\veniceXplorer" ""
DirText "Select the directory to install veniceXplorer in:"

Section "veniceXplorer"
SetOutPath "$INSTDIR"

File eula.txt
File readme.html

File mappe.ini
File mappe.CAB

File veniceXplorer.ini
File veniceXplorer.CAB

ReadRegStr $1 HKEY_LOCAL_MACHINE "software\Microsoft\Windows\CurrentVersion\App Paths\CEAppMgr.exe" ""
IfErrors Error
Goto End
Error:
MessageBox MB_OK|MB_ICONEXCLAMATION \
"Unable to find Application Manager for PocketPC applications. \
Please install ActiveSync and reinstall YourApp."
End:

StrCpy $3 "$INSTDIR\mappe.ini"
StrCpy $2 "$INSTDIR\veniceXplorer.ini"
Call InstallCAB

SectionEnd

Section "-post" ; (post install section, happens last after any optional sections) ; add any commands that need to happen after any optional sections here
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\hot dot\veniceXplorer" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\veniceXplorer" "DisplayName" "veniceXplorer (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\veniceXplorer" "UninstallString" '"$INSTDIR\uninst.exe"'

WriteUninstaller "$INSTDIR\uninst.exe"

MessageBox MB_YESNO|MB_ICONQUESTION \
"Setup has completed. View readme file now?" \
IDNO NoReadme

ExecShell open '$INSTDIR\readme.html'

NoReadme:

Quit
SectionEnd



ShowInstDetails nevershow ;never show installation details

UninstallText "This will uninstall YourApp from your system"


Section Uninstall
Delete "$INSTDIR\uninst.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\hot dot\veniceXplorer"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\veniceXplorer"
RMDir "$INSTDIR"
SectionEnd ; end of uninstall section

Function InstallCAB

ExecWait '"$1" "$2" "$3"'

FunctionEnd


mappe.ini:
[CEAppManager]
Version = 1.0
Component = PocketPlus

[PocketPlus]
Description = Pocket Plus
Uninstall = PocketPlus
CabFiles = mappe.cab


veniceXplorer.ini:
[CEAppManager]
Version = 1.0
Component = PocketPlus

[PocketPlus]
Description = Pocket Plus
Uninstall = PocketPlus
CabFiles = veniceXplorer.cab


That's all.

Thanks for your time!
b0ggy is offline   Reply With Quote
Old 11th February 2006, 18:03   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Maybe because they have the same component identifiers? Try different names in each INI.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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