【问题标题】:windows mobile 6.5 CAB signing and wceload /silent problemwindows mobile 6.5 CAB 签名和 wceload /silent 问题
【发布时间】:2011-07-09 22:41:14
【问题描述】:

我生成了一个个人证书文件 *.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,但它不起作用。 任何帮助表示赞赏。

问候

【问题讨论】:

    标签: .net security windows-mobile compact-framework cab


    【解决方案1】:

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

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

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

    另见:

    【讨论】:

    • 谢谢,我使用手工制作的 cer 文件签署了 CAB。现在 /silent 开关就像一个魅力。谢谢
    【解决方案2】:

    我的 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-07-02
      • 2011-07-24
      • 2010-12-11
      • 2016-03-28
      • 2012-07-29
      • 2013-04-20
      • 2013-07-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多