Hi all,
I wrote this autorun console application that install a cab from a SD card
when I insert the card to the device
I use only 2003 devices so I can write it in manage code.
I put the cabs and the autorun.exe in "2557" directory.
This is the code for the autorun console application than install my
application, the SQL CE cab, and the CF cab.
============================================================================
============
/// <summary>
/// Summary description for autorun.
/// </summary>
class autorun
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
try
{
File.Copy("\\Storage Card\\2577\\LorealSalesForce_PPC.ARMV4.CAB",
"\\Temp\\SalesForce_PPC.ARMV4.CAB", true);
ProcessHandler.CreateProcess("\\Windows\\wceload.exe",
"\\Temp\\SalesForce_PPC.ARMV4.CAB");
File.Copy("\\Storage Card\\2577\\sqlce.wce4.armv4.CAB",
"\\Temp\\sqlce.wce4.armv4.CAB", true);
ProcessHandler.CreateProcess("\\Windows\\wceload.exe",
"\\Temp\\sqlce.wce4.armv4.CAB");
File.Copy("\\Storage Card\\2577\\netcf.all.wce4.ARMV4.cab",
"\\Temp\\netcf.all.wce4.ARMV4.cab", true);
ProcessHandler.CreateProcess("\\Windows\\wceload.exe",
"\\Temp\\netcf.all.wce4.ARMV4.cab");
}
catch(Exception ex)
{
throw ex;
}
}
}
============================================================================
============
It works, but I have some problems
1.. When I take the SD card out from the device I get a
"FileNotFoundExeption" ???
2.. It works fine on QTEK 2020 but it is not working on my IPAQ 2215. The
SD directory name in IPAQ 2215 is "SD Card" and there is another directory
called "iPAQ File Store", the internal memory card of the device. The device
is looking for the "autorun.exe" in this directory and not in the SD card.
How can I tell the device that I want to use the "SD Card" directory for the
"autorun.exe"???
3.. If I already have a "autorun.exe" (un manage") on the SD card, How can
I add my "autorun.exe"???
Thanks,
Ofer