H
harry
Dear Experts,
I am, trying to build a smart application updater for my Windows CE
5.0 device running on LXE MX7.
I manage to implement if there's a new update the application will
download the update to the device with the webservice.
Once the download have been completed I am having this problem when
trying to launch CAB files with this procedure :
// When cab download is finished, launch it. This will cause
// wceload.exe to initiate installation process
private void AllDone(object sender, System.EventArgs e)
{
Cursor.Current = Cursors.Default;
string docname = GetCurrentDirectory() + @"\download.cab";
SetSecurityFlag(1);
try
{
ToolHelp.Process[] process =
ToolHelp.Process.GetProcesses();
ArrayList strProc = new ArrayList();
foreach (object obj in process)
{
if (obj.ToString() == "TestApp.exe")
{
strProc.Add(obj.ToString());
}
if (strProc.Count > 0)
{
ToolHelp.Process proc = (ToolHelp.Process)obj;
proc.Kill();
GC.Collect();
}
}
Process updater = Process.Start("\\windows\
\wceload.exe", "/silent /noui \"Program Files\\updater\\download.cab
\"");
updater.WaitForExit(60000);
SetSecurityFlag(0);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
the download.cab is going to install TestApp.exe on my device, when it
tries to run I got this error :
The fle "\System\TestApp\TestApp.exe" Is In Use or Is in ROM. If the
file is not in ROM, please close tha application using the file
as you see in the above code, I have implement a method for detecting
whether the process TestApp.Exe is running, and kill if it run.
the error remains about 45 seconds, after 45 seconds I can install the
CAB. and launch the TestApp.exe and see the assembly is updated with
the new version
Please advice
Best Regards,
Harry Nurman
I am, trying to build a smart application updater for my Windows CE
5.0 device running on LXE MX7.
I manage to implement if there's a new update the application will
download the update to the device with the webservice.
Once the download have been completed I am having this problem when
trying to launch CAB files with this procedure :
// When cab download is finished, launch it. This will cause
// wceload.exe to initiate installation process
private void AllDone(object sender, System.EventArgs e)
{
Cursor.Current = Cursors.Default;
string docname = GetCurrentDirectory() + @"\download.cab";
SetSecurityFlag(1);
try
{
ToolHelp.Process[] process =
ToolHelp.Process.GetProcesses();
ArrayList strProc = new ArrayList();
foreach (object obj in process)
{
if (obj.ToString() == "TestApp.exe")
{
strProc.Add(obj.ToString());
}
if (strProc.Count > 0)
{
ToolHelp.Process proc = (ToolHelp.Process)obj;
proc.Kill();
GC.Collect();
}
}
Process updater = Process.Start("\\windows\
\wceload.exe", "/silent /noui \"Program Files\\updater\\download.cab
\"");
updater.WaitForExit(60000);
SetSecurityFlag(0);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
the download.cab is going to install TestApp.exe on my device, when it
tries to run I got this error :
The fle "\System\TestApp\TestApp.exe" Is In Use or Is in ROM. If the
file is not in ROM, please close tha application using the file
as you see in the above code, I have implement a method for detecting
whether the process TestApp.Exe is running, and kill if it run.
the error remains about 45 seconds, after 45 seconds I can install the
CAB. and launch the TestApp.exe and see the assembly is updated with
the new version
Please advice
Best Regards,
Harry Nurman