BigHands

My C# Pocket PC application uses .NET Compact Framework 2.0 and SQL Server Compact Edition. I created an installer as per MSDN articles and other posts on this forum, however, something is not quite right. I have the following code in "BeforeInstall":


Code Block

Process proc = null;

proc = System.Diagnostics.Process.Start(appMgrPath, "\"" + Path.Combine(installPath, CEAPPMGR_INI_FILE_SQLCE) + "\"");
proc.WaitForExit();

proc = System.Diagnostics.Process.Start(appMgrPath, "\"" + Path.Combine(installPath, CEAPPMGR_INI_FILE_SQLCEREPL) + "\"");
proc.WaitForExit();

proc = System.Diagnostics.Process.Start(appMgrPath, "\"" + Path.Combine(installPath, CEAPPMGR_INI_FILE_FRAMEWORK) + "\"");
proc.WaitForExit();

proc = System.Diagnostics.Process.Start(appMgrPath, "\"" + Path.Combine(installPath, CEAPPMGR_INI_FILE) + "\"");
proc.WaitForExit();



This works fine, however my client has said this creates a very confusing install for his customers - and I agree with him. So upon reading other forum posts I created this code:

Code Block

Process proc = null;

proc = System.Diagnostics.Process.Start(appMgrPath, "/register \"" +

Path.Combine(installPath, CEAPPMGR_INI_FILE_SQLCE) + "\" \"" +
Path.Combine(installPath, CEAPPMGR_INI_FILE_SQLCEREPL) + "\" \"" +
Path.Combine(installPath, CEAPPMGR_INI_FILE_FRAMEWORK) + "\" \"" +
Path.Combine(installPath, CEAPPMGR_INI_FILE) + "\"");


// Wait for the above to register
proc.WaitForExit();

// Run ceAppMgr to install applications
System.Diagnostics.Process.Start(appMgrPath);


The issue is, the program never gets installed to the device. What comes up is the ActiveSync Add/Remove Programs dialog saying "Select a program's check box if you want to install it on your mobile device". How do I automate this process so everything will get installed to the device


Re: Smart Devices General Deployment issues - CF 2.0 and SQL Compact

AlexFeinman

According to the documentation what you see is the expected behavior. If you want to install multiple applications automatically, you should omit /register option (see the above link). Make sure that ActiveSync version is at least 4.0