开发者

windows mobile 6.5 CAB signing and wceload /silent problem

I generated a personal certificate file *.cer, signed my CAB file with it, installed this certificate on Windows Mobile 6.5. I want to silently install this CAB on the device. I call "wceload.exe /silent MyCab.CAB". The problem is that the /silent switch is not working - I get prompted for ack the installation of CAB while I'm expecting the /silent switch will ack all prompts itself. Additionally I'd like to avoid the dialog "The previous version of ... is installed..." if my CAB has been alre开发者_如何转开发ady installed before. Is there a way to do it on Windows Mobile? I tried setting the registry key HKLM/Software/Apps/My App/Instl to 0 but it is not working. Any help is appreciated.

Regards


have you tried warm-booting since the certificate was installed, and before you run wceload?

You could try adding /noui to your command-line with the /silent parameter, though that's supposed to be for legacy applications. http://msdn.microsoft.com/en-us/library/bb158700.aspx

But, you might be needing a Trusted Certificate. You can disable this requirement by changing [HKLM]\Security\Policies\Policies from [DWORD] 0 to [DWORD] 1.

see also:

  • "Understanding the Windows Mobile Security Model" http://technet.microsoft.com/en-us/library/cc512651.aspx
  • "Silent installation to Windows Mobile 5 and 6: security question" http://dukelupus.wordpress.com/2008/07/10/silent-installation-to-windows-mobile-5-and-6-security-question/


My CAB isn't signed, yet the following method works for me on WM 6.5 to install totally silently (no UI whatsoever - I show a busy cursor during the install). The install is performed programmatically (c# using the Process class) over the top of the existing install.

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

I was a bit surprised as the doc here: [http://msdn.microsoft.com/en-us/library/bb158700.aspx] says:

If the .cab file is not signed, and you specify the /silent or /noui options when calling wceload, wceload may ignore these options.

I guess it should say 'may or may not ignore these options' ;)

Full C# code below:

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜