Pocket PC Installer Using ActiveSync: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Created by user: JakeChance (talk, contrib).)
 
m (Reverted edits by 168.63.62.182 to last version by Kichik)
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{|align=right
{{PageAuthor|JakeChance}}
|<small>Author: [[{{ns:2}}:JakeChance|JakeChance]] ([[{{ns:3}}:JakeChance|talk]], [[{{ns:-1}}:Contributions/JakeChance|contrib]])</small>
 
|}
<br style="clear:both;">
== Description ==
== Description ==


Line 19: Line 17:
Section PathObtain
Section PathObtain
   ;It can be obtained from the registry at this location always
   ;It can be obtained from the registry at this location always
   ReadRegStr $CeAppMgrLocation HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE" ""
   ReadRegStr $CeAppMgrLocation HKLM \
    "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE" ""
SectionEnd
SectionEnd


Section CEInstallAndDelete
Section CEInstallAndDelete
   ;This calls the program and passes to it the program's ini file which tells it which CAB file(s) it needs and sets it up to install
   ;This calls the program and passes to it the program's ini file which
  ;tells it which CAB file(s) it needs and sets it up to install
   ExecWait '"$CeAppMgrLocation" "$INSTDIR\YourINIfile.ini"' $0
   ExecWait '"$CeAppMgrLocation" "$INSTDIR\YourINIfile.ini"' $0
   ;Changes the output path so the temporary folder can be deleted
   ;Changes the output path so the temporary folder can be deleted
Line 47: Line 47:
</highlight-ini>
</highlight-ini>


[[{{ns:14}}:Code Examples]]
[[Category:PDA Examples]]

Latest revision as of 20:25, 15 May 2013

Author: JakeChance (talk, contrib)


Description

This example shows how to make a desktop installer that only installs its contents to a Windows CE OS device by passing CAB files to the ActiveSync program.

Example

The Script

InstallDir "$TEMP\YourProgramName"
 
;Var to hold the location of CeAppMgr.exe
var CeAppMgrLocation
 
Section PathObtain
  ;It can be obtained from the registry at this location always
  ReadRegStr $CeAppMgrLocation HKLM \
    "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE" ""
SectionEnd
 
Section CEInstallAndDelete
  ;This calls the program and passes to it the program's ini file which
  ;tells it which CAB file(s) it needs and sets it up to install
  ExecWait '"$CeAppMgrLocation" "$INSTDIR\YourINIfile.ini"' $0
  ;Changes the output path so the temporary folder can be deleted
  SetOutPath $TEMP
  ;Remove the directory and all the files put into it
  RMDir /r /REBOOTOK $INSTDIR
SectionEnd

The INI File

Use this as this file: "$INSTDIR\YourINIfile.ini".

;DO NOT EDIT CEAppManager Version
[CEAppManager]
Version = 1.0
Component = YourProgramName
 
[YourProgramName]
Description = YourProgramName
CabFiles = YourCABFile(s).CAB