잊지 않겠습니다.

Wceload.exe

OS 자료들 2009. 1. 7. 13:32

I've been asked for assistance with the following issue today. A developer has a CAB that he wants to install on the device without using CeAppMgr, from his own setup application. In addition he wanted to force the installation to the storage card if present.

This task involves several steps:

  1. Copy CAB to the device
  2. Detect storage card presence
  3. Launch wceload.exe to install the cab

1. Copying CAB to the device.

I would use cecopy (from Windows Mobile Developer Power Toys) or RAPI (CeCreateFile, CeWriteFile). If working with managed code, I suggest OpenNETCF.Communications library, or RapiDeploy tool

2. Detecting storage card presence.

While on the device side the preferred method is to use FindFirstFlashCard/FindNextFlashCard, these functions do not have Rapi equivalent. From the desktop side use CeFindAllFiles/FAF_FOLDERS_ONLY (or CeFindFirstFile/CeFindNextFile) to search the root directory and enumerate all files for having FILE_ATTRIBUTE_DIRECTORY and FILE_ATTRIBUTE_TEMPORARY combination of attributes (0x110).

3. Launch wceload.exe to install the cab

This is the interesting part. Here is a list of command-line switches that wceload.exe supports:

  • /delete - if value = 0 do not delete cab after install
  • /noui - perform a silent operation. Do not ask if it is ok to overwrite the exiting files
  • /nouninstall - do not create a .uninstall file. The applciation entry will not appear in Remove Programs list
  • /askdest - will force wceload to display a dialog that allows user to select installaltion location and some other things
  • /noaskdest - install specified applications to specified locations (see below)

 


Dialog displayed by wceload when /askdest is specified

The /noaskdest switch is the most inetersting of them all. When you specify it, wceload ignores the rest of the command line. Instead it checks the following registry location - [HKEY_LOCAL_MACHINE\SOFTWARE\Apps\Microsoft Application Installer\Install]

The key contents are key/value pairs:
[CAB file path] = [CAB destination directory]
e.g. \Storage Card\MyApp.CAB = \Storage Card\Program Files\My App

wceload will try to install the cab specified in the value name to the location specified in the value value. Below is the sample registry content:

To reiterate: in order to install a cab to the memory card, one needs to:

  1. Copy CAB to the device (e.g. to the memory card)
  2. Create a registry value on the device specifying the cab location and cab destination
  3. Launch wceload.exe with /noaskdest parameter
Posted by Y2K
,

인증 및 보안

신원(Identity)을 통한 보안

실행권한 계층

  • Privileged
    • 모든 API 호출 가능
    • Registry Write
    • File Write (all Directories)
    • 인증서 설치 가능
    • Trusted
  • Normal
  • Locked
    • 실행 권한 없음
    • 모든 S/W의 실행 제한

인증서

인증서 + app -(Signtool.exe) = signed application

  • Priviliged, normal 권한
  • Priviliged 계약상의 권한이 있음
  • Mobile2Market 인증서 : windows에서 인증을 받은 상태
    • MS에서의 조건이 있는 상태
Two Tier
  • Privileged
  • Normal
  • Blocked 
One Tier
  • Privilieged
  • Blocked
Posted by Y2K
,

Track 4. Program 개발 &  Device

Managed Program Development and Device
Native Code
  • Win32 API
  • C, C++
  • 성능 극대화 가능
  • 단독 실행 가능
Managed Code
  • .NET CF
  • C#
  • Visual Basic .NET
  • 단독 실행 불가능 : CF 1.0(2MB), CF 2.0(5MB)
SQL Server 2005 Compact Edition
  • Compact, Mobile 모두 가능
  • Mobile < Compact 

  

Track 5. 기업형 Mobile 아키텍쳐

모바일 통신 환경
  • 연결성 Mobile 환경 : SKT와 같은 망에 연결된 상태(wireless, CDMA)
  • 비연결성 Mobile 환경 : PC에 Cradle에 연결된 상태

  

무선 Protocol 통신 속도
  • 배터리 파워를 고려
  • Communication HW 고려
  • 통신 비용 고려

  

DB 연결 방법
  • ADO 
  • OLE DB : 훨씬 빠르지만, Win32에서만 사용 가능

  

CDMA 관련 문제 고려
  • 통신 장애
  • Roll back, Transaction 반드시 고려할것!
Posted by Y2K
,