WCELOAD.EXE and /noaskdest

K

Krish

Hi,

I am trying to install cab files on WM 5.0 based Pocket PC at runtime
using wceload.exe.

I am curently using "/silent /delete 0" option while calling
wceload.exe and the application works fine without any issue.

The issue is I want to remove the /silent option to open up the UI for
user under certain condition(When security related warning comes up).
But still I want to default the destination I tried the /noaskdest
parameter but it always failed with some unknown error code
2147500037.

Here is my code snippet

PROCESS_INFORMATION pi;
memset(&pi, 0, sizeof(PROCESS_INFORMATION));
CString dFinalPath = "/noaskdest /delete 0 "; -- same works if "/
silent /delete 0"
dFinalPath += "\\ABC.CAB";
INT dState = CreateProcess(TEXT("\\Windows\
\wceload.exe"),dFinalPath,NULL, NULL, FALSE, 0, NULL, NULL, NULL,
&pi);
if (dState)
{
WaitForSingleObject(pi.hProcess, INFINITE);
::GetExitCodeThread(pi.hThread,&d);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
}
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
d,
0, // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
MessageBox(CString((LPCTSTR)lpMsgBuf));
// Free the buffer.
LocalFree( lpMsgBuf );

Any idea to use the flag /noaskdest in WM 5.0

Thanks,
Krish
 
G

Guest

This is a bit of a pain in WM5. If you pass over /silent then there will be
no UI at all, even if you are required to grant access. This is no equilalent
of /noaskdest as in pre WM5.

My advice is to sign your CAB with a granted certificate that already exists
in the Privileged Execution Trust Authority store or simply do not set the
/silent switch.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top