LEFT | RIGHT |
(no file at all) | |
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 */ | 199 */ |
200 /* | 200 /* |
201 * The UILevel property indicates whether we have the ability to put dialog
boxes up. | 201 * The UILevel property indicates whether we have the ability to put dialog
boxes up. |
202 * Levels 2 (silent) and 3 (basic) do not have this ability. | 202 * Levels 2 (silent) and 3 (basic) do not have this ability. |
203 * Levels 4 (reduced) and 5 (full) do. | 203 * Levels 4 (reduced) and 5 (full) do. |
204 * | 204 * |
205 * MSDN [UILevel property](http://msdn.microsoft.com/en-us/library/windows/d
esktop/aa372096%28v=vs.85%29.aspx) | 205 * MSDN [UILevel property](http://msdn.microsoft.com/en-us/library/windows/d
esktop/aa372096%28v=vs.85%29.aspx) |
206 */ | 206 */ |
207 std::wstring uilevel = Property( session, L"UILevel" ) ; | 207 std::wstring uilevel = Property( session, L"UILevel" ) ; |
208 bool interactive ; | 208 bool interactive ; |
209 if ( uilevel == L"5" || uilevel == L"4" ) | 209 if ( uilevel == L"5" || uilevel == L"4" || uilevel == L"3") |
210 { | 210 { |
211 interactive = true ; | 211 interactive = true ; |
212 // Assert state is one of { notKnown, allow, passive, active, automatic } | 212 // Assert state is one of { notKnown, allow, passive, active, automatic } |
213 } | 213 } |
214 else if ( uilevel == L"3" || uilevel == L"2" ) | 214 else if (uilevel == L"2") |
215 { | 215 { |
216 // Assert installer is running without user interaction. | 216 // Assert installer is running without user interaction. |
217 interactive = false ; | 217 interactive = false ; |
218 if ( state == notKnown ) | 218 if ( state == notKnown ) |
219 { | 219 { |
220 // Assert AVOIDREBOOT was not specified | 220 // Assert AVOIDREBOOT was not specified |
221 /* | 221 /* |
222 * This is where we specify default behavior for non-interactive operati
on. | 222 * This is where we specify default behavior for non-interactive operati
on. |
223 * The choice of "allow" makes it act like other installers, which is to
make no effort to avoid a reboot after installation. | 223 * The choice of "allow" makes it act like other installers, which is to
make no effort to avoid a reboot after installation. |
224 */ | 224 */ |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 return ERROR_INSTALL_FAILURE ; | 441 return ERROR_INSTALL_FAILURE ; |
442 } | 442 } |
443 catch( ... ) | 443 catch( ... ) |
444 { | 444 { |
445 session.LogNoexcept( "terminated by unknown exception" ) ; | 445 session.LogNoexcept( "terminated by unknown exception" ) ; |
446 return ERROR_INSTALL_FAILURE ; | 446 return ERROR_INSTALL_FAILURE ; |
447 } | 447 } |
448 // Should be unreachable. | 448 // Should be unreachable. |
449 return ERROR_INSTALL_FAILURE ; | 449 return ERROR_INSTALL_FAILURE ; |
450 } | 450 } |
LEFT | RIGHT |