我已经为Windows Compact 2013和CAB应用程序编写了一个应用程序,用于为运行Windows Compact 2013的设备生成CAB安装程序(在VS 2013上)。
在添加 - > 项目输出下,我只包含主要输出。 当我尝试在设备上安装CAB时,它没有安装并弹出错误。
这是为应用程序创建CAB文件的正确方法吗?如果没有,请建议正确的方法。
P.S。我已按照MSDN页面上所述的方法进行操作。
答案 0 :(得分:0)
Personnaly,我首选使用.ini文件并使用CabWiz程序生成cab文件。(您可以在C:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ SmartDevices \ SDK \ SDKTools中找到它。
简短的样本:
; 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