private void Application_Startup(object sender, StartupEventArgs e) { if (App.Current.InstallState != InstallState.Installed) { RootVisual = new PromptInstall(); } else { if (App.Current.InstallState == InstallState.Installed && !App.Current.IsRunningOutOfBrowser) { RootVisual = new AlreadyInstalled(); } else { if (Installer.CheckNESLInstalled(1, 0)) { RootVisual = new MainPage(); } else { MessageBox.Show("Native Extensions For Microsoft Silverlight Is Not Installed"); Installer.InstallNESL(new Uri("NESLSetup.msi", UriKind.Relative), false); if (Installer.CheckNESLInstalled(1, 0)) { RootVisual = new MainPage(); } else { MessageBox.Show("Native Extensions For Microsoft Silverlight Could Not Be Installed"); } } } } }