Hiya,
Im making an autorun.exe that needs to install 4 CAB files, onto a brand new device.
My problems are the following:
1) I need to install the netcf.core onto the device as part of the autoinstaller, but the autoinstaller isnt going to run unless the netcf runtimes are already installed..
The install process is as follows:
User enters SD card, auto installer pop's up, and prompts users to press a button to install (in the following order)
Netcf core.cab
SQLCE.cab
Application.cab
3rd party app.cab
So i have a problem in that the Autoinstaller.exe wont run unless the net core is installed on the device, and the netcore run times wont be installed unless the Autoinstaller.exe runs!
My second problem is, when invoking wceload.exe, i need the application to wait until the user has finished installing 1 cab file, before it moves onto the next, i tried thinking about using threads, and getting the thread to wait a period of time, but this would cause problems on slower devices/slower users. Is there a more efficiant way of doing this
Many thanks
Clint

Making wceload.exe wait / or return codes
Biodegradabl
hi.
Can somebody pls tell me how to customize taskbar & start menu in WinCE gui..
twinsfan08
Clint, we use this routine. The shell class contains some wrappers to Win32 apis and the exact apis used here are CreateProcess and GetExitCodeProcess. The method does block until wceload completes. If you are trying to deploy the Compact Framework then you might need to write the routine in eMbedded C++.
this.GetUpdatePath();s_UpdatePath =
if (System.IO.Directory.Exists(s_UpdatePath) == true)
{
DirectoryInfo diUpd = new DirectoryInfo(s_UpdatePath);
FileInfo[] updates = diUpd.GetFiles("*.cab");
foreach (FileInfo file in updates)
{
uint hProcess = 0;
bool rc = Shell.CreateProcessWin32( "wceload", "\"" + file.FullName + "\"",
ref hProcess );
uint lpExitCode = Shell.STILL_ACTIVE; int errorCode = 0;
while ( ( rc == true ) && ( lpExitCode == Shell.STILL_ACTIVE ) )
{
Application.DoEvents();
rc = Shell.GetExitCodeProcess( hProcess, ref lpExitCode );
if ( rc == true )
{
if ( lpExitCode == Shell.STILL_ACTIVE )
Thread.Sleep( 1000 );
}
else
{
errorCode = Marshal.GetLastWin32Error();
}
}
}
}