private void Installer_AfterInstall(object sender, System.Configuration.Install.InstallEventArgs e){ // get fullpath to .ini file string arg = Path.Combine( Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Setup.ini"); // run WinCE App Manager to install .cab file on device RunAppManager(arg);}private void Installer_AfterUninstall(object sender, System.Configuration.Install.InstallEventArgs e){ // run app manager in uninstall mode (without any arguments) RunAppManager(null);}private void RunAppManager(string arg){ // get path to the app manager const string RegPath = @"Software\Microsoft\Windows\" + @"CurrentVersion\App Paths\CEAppMgr.exe"; RegistryKey key = Registry.LocalMachine.OpenSubKey(RegPath); string appManager = key.GetValue("") as string; if (appManager != null) { // launch the app Process.Start( string.Format("\"{0}\"", appManager), (arg == null) ? "" : string.Format("\"{0}\"", arg)); } else { // could not locate app manager MessageBox.Show("Could not launch the WinCE Application Manager."); }}
analyse mesure frequentation internet par Conditions d’utilisation et Copyright Respect de la vie privée