2

我生成了一个个人证书文件 *.cer,用它签署了我的 CAB 文件,在 Windows Mobile 6.5 上安装了这个证书。我想在设备上静默安装这个 CAB。我称之为“wceload.exe /silent MyCab.CAB”。问题是 /silent 开关不工作 - 我收到提示确认 CAB 的安装,而我期望 /silent 开关会自行确认所有提示。此外,如果我的 CAB 之前已经安装过,我想避免出现“安装了以前版本的 ...”的对话框。有没有办法在 Windows Mobile 上做到这一点?我尝试将注册表项 HKLM/Software/Apps/My App/Instl 设置为 0,但它不起作用。任何帮助表示赞赏。

问候

4

2 回答 2

1

我的 CAB 未签名,但以下方法适用于我在 WM 6.5 上完全静默安装(没有任何 UI - 我在安装过程中显示忙碌光标)。安装以编程方式(使用 Process 类的 c#)在现有安装的顶部执行。

wceload /nodelete /silent "\Storage Card\Blah\Blah.CAB"

作为这里的文档,我有点惊讶:[http://msdn.microsoft.com/en-us/library/bb158700.aspx] 说:

如果 .cab 文件未签名,并且您在调用 wceload 时指定了 /silent 或 /noui 选项,则 wceload 可能会忽略这些选项。

我想它应该说“可能会或可能不会忽略这些选项”;)

完整的 C# 代码如下:

Cursor.Current = Cursors.WaitCursor;

try
{
    using (Process proc = new Process())
    {
        proc.StartInfo = new ProcessStartInfo("wceload", string.Format("/nodelete /silent \"{0}\"", cabFile));

        if (proc.Start())
        {
            proc.WaitForExit();
        }
    }
}
finally
{
    Cursor.Current = Cursors.Default;
}
于 2011-09-13T05:41:20.140 回答
1

自安装证书以来以及运行之前,您是否尝试过热启动wceload

您可以尝试/noui使用参数添加到命令行/silent,尽管这应该适用于旧版应用程序。http://msdn.microsoft.com/en-us/library/bb158700.aspx

但是,您可能需要受信任的证书。[HKLM]\Security\Policies\Policies您可以通过将[DWORD] 0 更改为 [DWORD] 1来禁用此要求。

也可以看看:

于 2011-04-05T14:24:17.290 回答