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
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