unloading programs in ROM

G

Guest

Hi all,

I am working on an Updater app for my compact fx applications. It checks a
web service for updates and if there are any, downloads the CAB file and
attempts to install it. Everything works fine until I try to install the cab
file, which, after wceload opens it, gives me the message "The program
(my_lovely.exe) is in use or is in ROM." I check running programs to make
sure it isn't running -- how can I clear it from ROM?

Thx

Helen
 
G

Guest

It can be running and not show in Running Programs - that's just all topmost
windows. Do you have any threads, etc. running?

-Chris
 
G

Guest

Thanks for your prompt reply.

I don't think I have any processes running, but I will enumerate the
processes to make sure. If for some reason the app was not closed properly,
you've helped me find a major bug.

Thx

Helen
 
G

Guest

Further to my last comment, I enumerated all the running processes and looked
at the processName of each. There were 22 of them -- who could have guessed
that poutlook and pword would be running in the background -- and the last of
them was my updater exe, but the program whose cab file I am trying to load
was not among them. Also, the updater app is in its own folder and the only
dlls it shares are those in the compact fx. Any other ideas?

Thx

Helen
 
G

Guest

I tried a couple more things. I manually did a soft reset on my device, which
cut the number of running processes down to 20 (pword and fexplore were gone)
but my updater was still unable to install the cab file, receiving the same
message as before. (BTW I am running it in the VS IDE in debug mode.)

Then I exited my app and opened the cab file by tapping on it in the file
explorer, and it installed without a hitch. Do I have to set any particular
parameters when I start wceload.exe to install the cab file?

Cheers,

Helen
 
A

Alex Feinman [MVP]

No, no special parameters.
I hate to ask the obvious, but for the lack of better ideas...
a) Is updater app by any chance a part of the cab being installed?
b) Did you remember to quote the path to the cab when passing it as a
command line to wceload?

--
Alex Feinman
---
Visit http://www.opennetcf.org
Helen Warn said:
I tried a couple more things. I manually did a soft reset on my device,
which
cut the number of running processes down to 20 (pword and fexplore were
gone)
but my updater was still unable to install the cab file, receiving the
same
message as before. (BTW I am running it in the VS IDE in debug mode.)

Then I exited my app and opened the cab file by tapping on it in the file
explorer, and it installed without a hitch. Do I have to set any
particular
parameters when I start wceload.exe to install the cab file?

Cheers,

Helen
 
G

Guest

Hi Alex,

I am using the OpenNETCF Process class and set the ProcessStartInfo with the
correct path to the CAB file. I have also tried using WaitForCompletion both
true and false, and UseShellExecute as both true and false. Finally I copied
over your ShellExecute stuff from your own AutoUpdater and used it. Every
time I get the same error message. A Google search shows that I have company.
Since the CAB file installs properly when I run it manually I am pretty sure
it is OK and properly downloaded from my web service.

Thanks for your suggestions -- any further ideas?

Cheers,

Helen
 
G

Guest

Here it is...
---
[Version]
Signature="$Windows NT$"
Provider="Agile Software Inc."
CESignature="$Windows CE$"

[CEStrings]
AppName="HSAA_Sales"
InstallDir=%CE1%\HSA

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[DefaultInstall.ARMV4]
CopyFiles=Files.ARMV4
CESetupDLL=vsd_setup.dll

[DefaultInstall.ARM]
CopyFiles=Files.ARM
CESetupDLL=vsd_setup.dll

[DefaultInstall.SH3]
CopyFiles=Files.SH3
CESetupDLL=vsd_setup.dll

[DefaultInstall.MIPS]
CopyFiles=Files.MIPS
CESetupDLL=vsd_setup.dll

[DefaultInstall.X86]
CopyFiles=Files.X86
CESetupDLL=vsd_setup.dll

[DefaultInstall.WCE420X86]
CopyFiles=Files.WCE420X86
CESetupDLL=vsd_setup.dll

[SourceDisksNames]
1=,"Common1",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
2=,"Common2",,"D:\Net CF Apps\HSASalesOrder\HSA.SalesOrder.Common\"
3=,"Common3",,"D:\Net CF Apps\HSASalesOrder\HSA.SalesOrder.Common\"
4=,"Common4",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\"
5=,"Common5",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\"
6=,"Common6",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
7=,"Common7",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
8=,"Common8",,"D:\Net CF Apps\Libraries\Debug\"
9=,"Common9",,"D:\Net CF Apps\HSASalesOrder\HSA.SalesOrder.Data\obj\Debug\"
10=,"Common10",,"D:\Net CF Apps\Libraries\Debug\"
11=,"Common11",,"D:\Net CF Apps\Libraries\Debug\"
12=,"Common12",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
13=,"Common13",,"D:\Net CF
Apps\HSASalesOrder\HSA.SalesOrder.Business\obj\Debug\"
14=,"Common14",,"D:\Net CF Apps\Libraries\Debug\"

[SourceDisksNames.ARMV4]
15=,"ARMV415",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
16=,"ARMV4_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\ARMV4\"

[SourceDisksNames.ARM]
17=,"ARM17",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
18=,"ARM_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\ARM\"

[SourceDisksNames.SH3]
19=,"SH319",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
20=,"SH3_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\SH3\"

[SourceDisksNames.MIPS]
21=,"MIPS21",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
22=,"MIPS_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\MIPS\"

[SourceDisksNames.X86]
23=,"X8623",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
24=,"X86_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\X86\"

[SourceDisksNames.WCE420X86]
25=,"WCE420X8625",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
26=,"WCE420X86_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\WCE420X86\"

[SourceDisksFiles]
HSAA Sales.exe=1
HSA.bmp=2
HSA.xml=3
hsa16.ico=4
hsa32.ico=5
C1.CF.C1FlexGrid.dll=6
System.SR.dll=7
HSAA.Common.dll=8
HSAA.DAL.dll=9
HSAA.Sales.Commissions.dll=10
HSAA.Constants.dll=11
DetailView.dll=12
HSAA.BLL.dll=13
AgileCEUtils.dll=14

[SourceDisksFiles.ARMV4]
vsd_config.txt.ARMV4=15
vsd_setup.dll=16

[SourceDisksFiles.ARM]
vsd_config.txt.ARM=17
vsd_setup.dll=18

[SourceDisksFiles.SH3]
vsd_config.txt.SH3=19
vsd_setup.dll=20

[SourceDisksFiles.MIPS]
vsd_config.txt.MIPS=21
vsd_setup.dll=22

[SourceDisksFiles.X86]
vsd_config.txt.X86=23
vsd_setup.dll=24

[SourceDisksFiles.WCE420X86]
vsd_config.txt.WCE420X86=25
vsd_setup.dll=26

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu
Files.ARMV4=0,%InstallDir%
Files.ARM=0,%InstallDir%
Files.SH3=0,%InstallDir%
Files.MIPS=0,%InstallDir%
Files.X86=0,%InstallDir%
Files.WCE420X86=0,%InstallDir%

[Files.Common]
HSAA Sales.exe,,,0
HSA.bmp,,,0
HSA.xml,,,0
hsa16.ico,,,0
hsa32.ico,,,0
C1.CF.C1FlexGrid.dll,,,0
System.SR.dll,,,0
HSAA.Common.dll,,,0
HSAA.DAL.dll,,,0
HSAA.Sales.Commissions.dll,,,0
HSAA.Constants.dll,,,0
DetailView.dll,,,0
HSAA.BLL.dll,,,0
AgileCEUtils.dll,,,0

[Files.ARMV4]
vsd_config.txt,vsd_config.txt.ARMV4,,0
vsd_setup.dll,,,0

[Files.ARM]
vsd_config.txt,vsd_config.txt.ARM,,0
vsd_setup.dll,,,0

[Files.SH3]
vsd_config.txt,vsd_config.txt.SH3,,0
vsd_setup.dll,,,0

[Files.MIPS]
vsd_config.txt,vsd_config.txt.MIPS,,0
vsd_setup.dll,,,0

[Files.X86]
vsd_config.txt,vsd_config.txt.X86,,0
vsd_setup.dll,,,0

[Files.WCE420X86]
vsd_config.txt,vsd_config.txt.WCE420X86,,0
vsd_setup.dll,,,0

[Shortcuts]
HSAA Sales,0,HSAA Sales.exe,%CE11%




---
 
A

Alex Feinman [MVP]

Is updater app using any of the files:
HSAA Sales.exe=1
HSA.bmp=2
HSA.xml=3
hsa16.ico=4
hsa32.ico=5
C1.CF.C1FlexGrid.dll=6
System.SR.dll=7
HSAA.Common.dll=8
HSAA.DAL.dll=9
HSAA.Sales.Commissions.dll=10
HSAA.Constants.dll=11
DetailView.dll=12
HSAA.BLL.dll=13
AgileCEUtils.dll=14

Maybe System.SR.DLL?

--
Alex Feinman
---
Visit http://www.opennetcf.org
Helen Warn said:
Here it is...
---
[Version]
Signature="$Windows NT$"
Provider="Agile Software Inc."
CESignature="$Windows CE$"

[CEStrings]
AppName="HSAA_Sales"
InstallDir=%CE1%\HSA

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[DefaultInstall.ARMV4]
CopyFiles=Files.ARMV4
CESetupDLL=vsd_setup.dll

[DefaultInstall.ARM]
CopyFiles=Files.ARM
CESetupDLL=vsd_setup.dll

[DefaultInstall.SH3]
CopyFiles=Files.SH3
CESetupDLL=vsd_setup.dll

[DefaultInstall.MIPS]
CopyFiles=Files.MIPS
CESetupDLL=vsd_setup.dll

[DefaultInstall.X86]
CopyFiles=Files.X86
CESetupDLL=vsd_setup.dll

[DefaultInstall.WCE420X86]
CopyFiles=Files.WCE420X86
CESetupDLL=vsd_setup.dll

[SourceDisksNames]
1=,"Common1",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
2=,"Common2",,"D:\Net CF Apps\HSASalesOrder\HSA.SalesOrder.Common\"
3=,"Common3",,"D:\Net CF Apps\HSASalesOrder\HSA.SalesOrder.Common\"
4=,"Common4",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\"
5=,"Common5",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\"
6=,"Common6",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
7=,"Common7",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
8=,"Common8",,"D:\Net CF Apps\Libraries\Debug\"
9=,"Common9",,"D:\Net CF
Apps\HSASalesOrder\HSA.SalesOrder.Data\obj\Debug\"
10=,"Common10",,"D:\Net CF Apps\Libraries\Debug\"
11=,"Common11",,"D:\Net CF Apps\Libraries\Debug\"
12=,"Common12",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
13=,"Common13",,"D:\Net CF
Apps\HSASalesOrder\HSA.SalesOrder.Business\obj\Debug\"
14=,"Common14",,"D:\Net CF Apps\Libraries\Debug\"

[SourceDisksNames.ARMV4]
15=,"ARMV415",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
16=,"ARMV4_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\ARMV4\"

[SourceDisksNames.ARM]
17=,"ARM17",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
18=,"ARM_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\ARM\"

[SourceDisksNames.SH3]
19=,"SH319",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
20=,"SH3_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\SH3\"

[SourceDisksNames.MIPS]
21=,"MIPS21",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
22=,"MIPS_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\MIPS\"

[SourceDisksNames.X86]
23=,"X8623",,"D:\Net CF Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
24=,"X86_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\X86\"

[SourceDisksNames.WCE420X86]
25=,"WCE420X8625",,"D:\Net CF
Apps\HSASalesOrder\HSA_SalesOrder\obj\Debug\"
26=,"WCE420X86_Setup",,"c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce300\WCE420X86\"

[SourceDisksFiles]
HSAA Sales.exe=1
HSA.bmp=2
HSA.xml=3
hsa16.ico=4
hsa32.ico=5
C1.CF.C1FlexGrid.dll=6
System.SR.dll=7
HSAA.Common.dll=8
HSAA.DAL.dll=9
HSAA.Sales.Commissions.dll=10
HSAA.Constants.dll=11
DetailView.dll=12
HSAA.BLL.dll=13
AgileCEUtils.dll=14

[SourceDisksFiles.ARMV4]
vsd_config.txt.ARMV4=15
vsd_setup.dll=16

[SourceDisksFiles.ARM]
vsd_config.txt.ARM=17
vsd_setup.dll=18

[SourceDisksFiles.SH3]
vsd_config.txt.SH3=19
vsd_setup.dll=20

[SourceDisksFiles.MIPS]
vsd_config.txt.MIPS=21
vsd_setup.dll=22

[SourceDisksFiles.X86]
vsd_config.txt.X86=23
vsd_setup.dll=24

[SourceDisksFiles.WCE420X86]
vsd_config.txt.WCE420X86=25
vsd_setup.dll=26

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu
Files.ARMV4=0,%InstallDir%
Files.ARM=0,%InstallDir%
Files.SH3=0,%InstallDir%
Files.MIPS=0,%InstallDir%
Files.X86=0,%InstallDir%
Files.WCE420X86=0,%InstallDir%

[Files.Common]
HSAA Sales.exe,,,0
HSA.bmp,,,0
HSA.xml,,,0
hsa16.ico,,,0
hsa32.ico,,,0
C1.CF.C1FlexGrid.dll,,,0
System.SR.dll,,,0
HSAA.Common.dll,,,0
HSAA.DAL.dll,,,0
HSAA.Sales.Commissions.dll,,,0
HSAA.Constants.dll,,,0
DetailView.dll,,,0
HSAA.BLL.dll,,,0
AgileCEUtils.dll,,,0

[Files.ARMV4]
vsd_config.txt,vsd_config.txt.ARMV4,,0
vsd_setup.dll,,,0

[Files.ARM]
vsd_config.txt,vsd_config.txt.ARM,,0
vsd_setup.dll,,,0

[Files.SH3]
vsd_config.txt,vsd_config.txt.SH3,,0
vsd_setup.dll,,,0

[Files.MIPS]
vsd_config.txt,vsd_config.txt.MIPS,,0
vsd_setup.dll,,,0

[Files.X86]
vsd_config.txt,vsd_config.txt.X86,,0
vsd_setup.dll,,,0

[Files.WCE420X86]
vsd_config.txt,vsd_config.txt.WCE420X86,,0
vsd_setup.dll,,,0

[Shortcuts]
HSAA Sales,0,HSAA Sales.exe,%CE11%




---

Steve Maillet (eMVP) said:
Can you post the INF for the CAB file?

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com
 
G

Guest

No, the Updater app has no reference to SR.dll, and it has its own copy of
AgileCEUtils.dll which is not in the GAC. The other references are MSCorLib,
System, System.Data, System.Drawing, System.Web.Services,
System.Windows.Forms & System.Xml.


The .inf file was generated by VS2003 and the only changes I made to it were
the Company and deployment folder.

Cheers,

Helen
 
I

Ilya Tumanov [MS]

System.Sr.dll it used by CF runtime, so it's irrelevant if you have
reference to it in your project or not.

It will be loaded if attempt has been made to retrieve any string from it
for any reason including handled exception.



Also, it's not redistributable, only SR CAB is redistributable. You should
remove System.Sr.dll from the CAB in use SR CAB instead.

Please see [Program Files]\Microsoft Visual Studio .NET 2003\redist.txt for
a list of files you can redistribute.



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.



Helen Warn said:
No, the Updater app has no reference to SR.dll, and it has its own copy of
AgileCEUtils.dll which is not in the GAC. The other references are
MSCorLib,
System, System.Data, System.Drawing, System.Web.Services,
System.Windows.Forms & System.Xml.


The .inf file was generated by VS2003 and the only changes I made to it
were
the Company and deployment folder.

Cheers,

Helen
 
H

Helen Warn

Ilya Tumanov said:
System.Sr.dll it used by CF runtime, so it's irrelevant if you have
reference to it in your project or not.

It will be loaded if attempt has been made to retrieve any string from it
for any reason including handled exception.



Also, it's not redistributable, only SR CAB is redistributable. You should
remove System.Sr.dll from the CAB in use SR CAB instead.

Please see [Program Files]\Microsoft Visual Studio .NET 2003\redist.txt for
a list of files you can redistribute.



Best regards,



Ilya

This is a debug version of the project. It is not being distributed.

Cheers,

Helen
 
I

Ilya Tumanov [MS]

Anyway, that might be the reason why something is in use.

Not to mention SR CAB would add SR DLL to GAC.



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.





Helen Warn said:
Ilya Tumanov said:
System.Sr.dll it used by CF runtime, so it's irrelevant if you have
reference to it in your project or not.

It will be loaded if attempt has been made to retrieve any string from it
for any reason including handled exception.



Also, it's not redistributable, only SR CAB is redistributable. You
should
remove System.Sr.dll from the CAB in use SR CAB instead.

Please see [Program Files]\Microsoft Visual Studio .NET 2003\redist.txt for
a list of files you can redistribute.



Best regards,



Ilya

This is a debug version of the project. It is not being distributed.

Cheers,

Helen
 
H

Helen Warn

To anyone who has been following this thread, I just want to report that
Alex found my problem. I was loading the assembly when I checked its version
and was not unloading it properly. Alex shared some code that uses P/Invoke
to get the assembly version without loading it, which solved my problem.

THANKS Alex!

Cheers

Helen

Helen Warn said:
No, the Updater app has no reference to SR.dll, and it has its own copy of
AgileCEUtils.dll which is not in the GAC. The other references are MSCorLib,
System, System.Data, System.Drawing, System.Web.Services,
System.Windows.Forms & System.Xml.


The .inf file was generated by VS2003 and the only changes I made to it were
the Company and deployment folder.

Cheers,

Helen
 

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