0

Is there a better way than catching an exception thrown when attempting to read a session variable that is not accessible in deferred mode? Thanks

PhilDW
  • 20,260
  • 1
  • 18
  • 28
donal
  • 163
  • 2
  • 4
  • 13
  • 1
    `Is there a better way` means that you want something better compared to something you are doing/have currently. So, mention it in your post first :) – Software Dev May 10 '18 at 11:00

1 Answers1

1

Look at Session.GetMode(InstallRunMode), analogous to the Session.Mode property. Note that there are three InstallRunMode values that correlate to the in-script execution scenario you're asking about: Scheduled, Rollback, and Commit.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44