Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Is there a way to reset the IsFirstRun in ClickOnce apps?
  2. ApplicationDeployment.CurrentDeployment.IsFirstRun
  3.        
  4. if (ApplicationDeployment.IsNetworkDeployed &&
  5.     ApplicationDeployment.CurrentDeployment.IsFirstRun)
  6. {
  7.     ...doing stuff
  8. }
  9.        
  10. if (ApplicationDeployment.IsNetworkDeployed &&
  11.     ApplicationDeployment.CurrentDeployment.IsFirstRun)
  12. {
  13.      Settings.Default.IsFirstRun = false;
  14.      Settings.Default.Save();
  15. }
  16.  
  17. ....
  18.  
  19. if (Settings.Default.IsFirstRun)
  20. {
  21.     // simply test here to see if its first run
  22.     // you can just flip flag flag in the settings
  23.     // to acheive the same result.
  24. }