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
Asked
Active
Viewed 411 times
0
-
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 Answers
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