Site icon EfmSoft

What does Windows error code 1191 (ERROR_SHUTDOWN_USERS_LOGGED_ON) mean?

 
Previous Next
ERROR_SHUTDOWN_IS_SCHEDULED ERROR_BAD_DEVICE

ERROR_SHUTDOWN_USERS_LOGGED_ON

Other signed-in users prevent the requested shutdown.

ERROR_SHUTDOWN_USERS_LOGGED_ON has value 1191 (0x4A7). InitiateShutdown can return it when users other than the initiating user are logged on and the request does not include permission to force those sessions to close.

Why Windows blocks the request

Forcing a session to end can discard unsaved work, interrupt remote administration, and terminate long-running interactive tasks. The result is therefore a policy boundary rather than a hardware failure. A maintenance tool should surface the active-session condition instead of converting it to a generic shutdown error.

Session evidence to collect

Avoid logging authentication tokens or command histories while collecting session information.

Administrator choices

Notify users and reschedule the operation when data preservation is more important than immediate shutdown. During an approved emergency or enforced maintenance window, the controller may use SHUTDOWN_FORCE_OTHERS according to organizational policy. The decision should be explicit because the flag changes the data-loss risk, not merely the API behavior.

Application behavior

Difference from scheduled shutdown

ERROR_SHUTDOWN_IS_SCHEDULED means another shutdown is already pending. Error 1191 means the attempted shutdown has not been accepted because other sessions exist. ERROR_PRIVILEGE_NOT_HELD indicates the caller lacks the shutdown privilege and must be handled separately.

Example

A server-maintenance agent attempts a reboot while an administrator has a disconnected Remote Desktop session containing an unsaved console. The API returns 1191. The agent sends a warning, waits for the approved window, confirms the session still exists, and only then issues a policy-authorized forced reboot.

References


Looking for a different code? Search another status or error code.

Exit mobile version