1

I have written an application for Windows Compact 2013 and a CAB Application to generate a CAB Installer (on VS 2013) for the device that is running Windows Compact 2013.

Under Add->Project Output, I have included only Primary Output. When I try to install the CAB on the Device, it does not get installed and pops up an error.

Is this the correct way to Create a CAB File for an application? If not please suggest the correct method to do so.

P.S. I have followed the method stated on the MSDN Page.

AneeshCRao
  • 35
  • 6
  • a) what is the error? b) what ist the method you followed? – josef Jan 27 '18 at 06:32
  • The error it shows is "The file is not a valid windows embedded compact setup file". I created a cab project in my solution and included the primary output under project output and built the cab file and transferred it to the Windows Compact 2013 Device. – AneeshCRao Jan 28 '18 at 11:53
  • Looks like the cab project put the wrong restriction into the cab. There is also a manual way described at Microsoft uing an inf file and cab wizard, – josef Feb 01 '18 at 06:07
  • Yeah okay. I'll try that out. I just seemed like this was a more convenient way to do it. Thanks :) – AneeshCRao Feb 03 '18 at 13:37

1 Answers1

0

Personnaly, I prefere use a .ini file and generate cab file with CabWiz program.(You can find it at C:\Program Files (x86)\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools).

A short sample:

; https://msdn.microsoft.com/en-us/windows/hardware/drivers/install/inf-

files
[Version]
Signature="$Windows NT$"
Provider="MyCompany"
CESignature="$Windows CE$"

[Strings]
Manufacturer="MyCompany"
; There put relative path to your sln projet
SlnProjectPath=".."

[CEStrings]
AppName="MyApp"
InstallDir=\Program Files\%Manufacturer%

[CEDevice]
VersionMin=4.0
VersionMax=6.99
BuildMax=0xE0000000

[DefaultInstall]
CEShortcuts=Shortcuts
AddReg=RegKeys
CopyFiles=Files.Binaries

[SourceDisksNames]
1=,"ZgRemoteAppBin",,"%SlnProjectPath%\ZgRemoteApp\bin\Release\Remote\"
2=,"ZgCabInstallerBin",,"%SlnProjectPath%\ExternalLibs\"

[SourceDisksFiles]
"MyLibrary.dll"=1
"MyApp.exe"=1
"Newtonsoft.Json.Compact.dll"=2

[DestinationDirs]
Shortcuts=0,%CE2%\Start Menu
Files.Binaries=0,"%InstallDir%\%AppName%"

[Files.Binaries]
"MyLibrary.dll",,,0
"MyApp.exe",,,0
"Newtonsoft.Json.Compact.dll",,,0

[Shortcuts]
; If you want desktop shorcut for example

[RegKeys]
; https://msdn.microsoft.com/fr-fr/windows/hardware/drivers/install/inf-addreg-directive
; reg-root,[subkey],[value-entry-name],[flags],[value][,[value]]

; Auto start app.
HKLM,Init,Launch99,0x00000000,%InstallDir%\%AppName%\%AppName%.exe
sGeeK
  • 46
  • 4