Run .cpf files programatically

C

Chandra

Hi Guys,

I am able to generate .cpf file from the _Setup.xml and deployed
successfully.cpf file and when the user clicks on .cpf file it installs
all the settings as I wanted to on the device.But the problem is the
user should click on .cpf file,Is there any way I can run .cpf file
after my application has been installed or without any user
intervention.

I used another approach by using makecab /D COMPRESS=ON _setup.xml
AllowRapi.cab and then used Signtool sign /f
SDKSampleprivDeveloper.pfx AllowRapi.cab and copied the cab file to the
device and its working fine.So i thought I would create a .ini file and
pass this AllowRapi.cab to Ceappmgr to install it on the device
programatically but its throwing an error saying invalid windows CE CAB
header.But if i copy the AllowRapi.cab file to my device and tap on it
its changing the registry settings as required.

I just dont want the user to tap on it.I want it to run as part of my
application without user intervention.

Please help me.

Regards

Chandra
 
N

Nino Benvenuti

Chandra,

wceload.exe will handle your .cpf file. You could either call
ShellExecuteEx and pass the .cpf as the app name, or launch wceload.exe
(via ShellExecuteEx or CreateProcess) and pass it the .cpf.

Query the archives of this group and of
microsoft.public.pocketpc.developer for examples.
 
C

Chandra

Hi Nino,

Thanks very much for your suggestion.its working for me now.

One other question I created a separate desktop Vs2005.net project and
am trying to call DMProcessConfigXML() but its throwing an error
ayshell.dll not found.So I tried in a managed way, I added a reference
to using Microsoft.WindowsMobile.Configuration from the project and
mind you its not a Smart Device project and called the function

string configurationXml = @"<wap-provisioningdoc>
<characteristic type=""SecurityPolicy"">
<!--
RAPI mode : Allowed -->
<parm name=""4097"" value=""1"" />
</characteristic>
</wap-provisioningdoc>";
//XmlDocument configurationXmlDoc = new XmlDocument();

//configurationXmlDoc.LoadXml(configurationXml);

// Send to Configuration Manager


//ConfigurationManager.ProcessConfiguration(configurationXmlDoc,
false);

Its throwing DLLNotFoundException as it cannot find aygshell.dll.

I tried calling the same code by creating a Smart device project and it
works fine.But I want to provision the xml from the NON smart device
project. I know I have to PInvoke DMPRocessConfigXML file but its
throwing ayshell.dll not found error.plz help me.

Thanks

Chandra
 
N

Nino Benvenuti

Chandra,

DMProcessConfigXML will not work on the desktop. What is the goal you
wish to accomplish with this?
 
C

Chandra

Want to change the settings in the registry of the device for allowing
RAPI to work in full control instead of restricted mode.
 
N

Nino Benvenuti

You would need to first change the security configuration of the device
(which the XML you posted earlier is accurate for). What type of device
are you working with?

If you are unable to change this (i.e. you do not have privileged acces
 

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