| OLD | NEW |
| 1 /** | 1 /** |
| 2 * \file close_application.cpp | 2 * \file close_application.cpp |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "session.h" | 7 #include "session.h" |
| 8 #include "property.h" | 8 #include "property.h" |
| 9 #include "database.h" | 9 #include "database.h" |
| 10 #include "process.h" | 10 #include "process.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 * Levels 2 (silent) and 3 (basic) do not have this ability. | 201 * Levels 2 (silent) and 3 (basic) do not have this ability. |
| 202 * Levels 4 (reduced) and 5 (full) do. | 202 * Levels 4 (reduced) and 5 (full) do. |
| 203 * | 203 * |
| 204 * MSDN [UILevel property](http://msdn.microsoft.com/en-us/library/windows/d
esktop/aa372096%28v=vs.85%29.aspx) | 204 * MSDN [UILevel property](http://msdn.microsoft.com/en-us/library/windows/d
esktop/aa372096%28v=vs.85%29.aspx) |
| 205 */ | 205 */ |
| 206 std::wstring uilevel = Property(session, L"UILevel"); | 206 std::wstring uilevel = Property(session, L"UILevel"); |
| 207 bool interactive; | 207 bool interactive; |
| 208 if (uilevel == L"5" || uilevel == L"4") | 208 if (uilevel == L"5" || uilevel == L"4") |
| 209 { | 209 { |
| 210 interactive = true; | 210 interactive = true; |
| 211 // Assert state is one of { notKnown, allow, passive, active, automatic } | 211 // Assert state is one of {notKnown, allow, passive, active, automatic} |
| 212 } | 212 } |
| 213 else if (uilevel == L"3" || uilevel == L"2") | 213 else if (uilevel == L"3" || uilevel == L"2") |
| 214 { | 214 { |
| 215 // Assert installer is running without user interaction. | 215 // Assert installer is running without user interaction. |
| 216 interactive = false; | 216 interactive = false; |
| 217 if (state == notKnown) | 217 if (state == notKnown) |
| 218 { | 218 { |
| 219 // Assert AVOIDREBOOT was not specified | 219 // Assert AVOIDREBOOT was not specified |
| 220 /* | 220 /* |
| 221 * This is where we specify default behavior for non-interactive operati
on. | 221 * This is where we specify default behavior for non-interactive operati
on. |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 return ERROR_INSTALL_FAILURE; | 436 return ERROR_INSTALL_FAILURE; |
| 437 } | 437 } |
| 438 catch (...) | 438 catch (...) |
| 439 { | 439 { |
| 440 session.LogNoexcept("terminated by unknown exception"); | 440 session.LogNoexcept("terminated by unknown exception"); |
| 441 return ERROR_INSTALL_FAILURE; | 441 return ERROR_INSTALL_FAILURE; |
| 442 } | 442 } |
| 443 // Should be unreachable. | 443 // Should be unreachable. |
| 444 return ERROR_INSTALL_FAILURE; | 444 return ERROR_INSTALL_FAILURE; |
| 445 } | 445 } |
| OLD | NEW |