Reputation: 1
I am preparing msi file to automate installation of my windows ce app from the computer and i want to uninstall app if already installed. my code:
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\microsoft\\windows\\currentversion\\app paths\\ceappmgr.exe");string appPath = key.GetValue(null).ToString();
ProcessStartInfo info = new ProcessStartInfo();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml("<wap-provisioningdoc>" +
"<characteristic type=\"UnInstall\">" +
"<characteristic type=\"AppName\">" +
"<parm name=\"uninstall\" value=\"1\"/>" +
"</characteristic>" +
"</characteristic>" +
"</wap-provisioningdoc>");
Microsoft.WindowsMobile.Configuration.ConfigurationManager.ProcessConfiguration(doc, false);
info.Arguments = "Arguments here";
info.FileName = appPath;
process.StartInfo = info;
process.Start();
I am getting "Unable to load DLL 'aygshell.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" exception
And this is the stack trace:
at
Microsoft.WindowsMobile.Configuration.ConfigurationManager.SafeNativeMethods.DMProcessConfigXml(String wapDocument, UInt32 flags, IntPtr& documentPointer) at Microsoft.WindowsMobile.Configuration.ConfigurationManager.MainConfigurator(XmlDocument configDoc, UInt32 flags) at Microsoft.WindowsMobile.Configuration.ConfigurationManager.ProcessConfiguration(XmlDocument configDoc, Boolean metadata) at setupconsoleapp1.Class1.installfile() in FileLocation\setupconsoleapp1\setupconsoleapp1\Class1.cs:line 251 at setupconsoleapp1.Program.Main(String[] args) in FileLocation\Program.cs:line 13 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at System.Activator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Upvotes: 0
Views: 527
Reputation: 2210
You talk about Windows Mobile and Windows CE. Those are different versions of the same core OS and while aygshell is a component that you can expect in any Windows Mobile device it may not be part of a Windows CE OS image. Windows CE is much more configurable and some OEMs may remove components that are not needed. Aygshell is not included in the less expensive core license of the OS (at least up to CE 6.0) and so the OEM may decide to remove it to reduce the device price.
Upvotes: 1