WinUtils
A module for Windows utilities
Installation:
pip install winutils
Examples:
import WinUtils as wu
wu.Shutdown(wu.SHTDN_REASON_MINOR_OTHER) # Shutdown other error, minor
wu.Restart(wu.SHTDN_REASON_MAJOR_SOFTWARE) # Restart Software error, major
wu.LogOut(wu.SHTDN_REASON_MINOR_HOTFIX) # Log out user hot fix, minor
Reference:
Functions:
Shutdown(condition) - Shut down the device, condition is logged by the system
Restart(condition) - Restart the device, condition is logged by the system
LogOut(condition) - Logs out the user from the device, condition is logged by the system
All Error Codes:
Major flags:
SHTDN_REASON_MAJOR_APPLICATION: Application issue
SHTDN_REASON_MAJOR_HARDWARE: Hardware issue
SHTDN_REASON_MAJOR_OPERATINGSYSTEM: Operating system issue
SHTDN_REASON_MAJOR_OTHER: Other issue
SHTDN_REASON_MAJOR_POWER: Power failure
SHTDN_REASON_MAJOR_SOFTWARE: Software issue
SHTDN_REASON_MAJOR_SYSTEM: System failure
Minor flags:
SHTDN_REASON_MINOR_BLUESCREEN: Blue screen crash event.
SHTDN_REASON_MINOR_CORDUNPLUGGED: Unplugged
SHTDN_REASON_MINOR_DISK: Disk
SHTDN_REASON_MINOR_ENVIRONMENT: Environment
SHTDN_REASON_MINOR_HARDWARE_DRIVER: Driver
SHTDN_REASON_MINOR_HOTFIX: Hot Fix
SHTDN_REASON_MINOR_HOTFIX_UNINSTALL: Hot fix uninstallation
SHTDN_REASON_MINOR_HUNG: Unresponsive
SHTDN_REASON_MINOR_INSTALLATION: Installation
SHTDN_REASON_MINOR_MAINTENANCE: Maintenance
SHTDN_REASON_MINOR_MMC: MMC issue
SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY: Network connectivity.
SHTDN_REASON_MINOR_NETWORKCARD: Network card
SHTDN_REASON_MINOR_OTHER: Other issue
SHTDN_REASON_MINOR_OTHERDRIVER: Other driver event
SHTDN_REASON_MINOR_POWER_SUPPLY: Power supply
SHTDN_REASON_MINOR_PROCESSOR: Processor
SHTDN_REASON_MINOR_RECONFIG: Reconfigure
SHTDN_REASON_MINOR_SECURITY: Secuity issue
SHTDN_REASON_MINOR_SECURITYFIX: Security patch
SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL: Security patch uninstallation
SHTDN_REASON_MINOR_SERVICEPACK: Service pack
SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL: Service pack uninstallation
SHTDN_REASON_MINOR_TERMSRV: Terminal services
SHTDN_REASON_MINOR_UNSTABLE: Unstable
SHTDN_REASON_MINOR_UPGRADE: Upgrade
SHTDN_REASON_MINOR_WMI: WMI issue
Additional flags (optional):
SHTDN_REASON_FLAG_USER_DEFINED: The reason code is defined by the user. If this flag is not present, the reason code is defined by the system
SHTDN_REASON_FLAG_PLANNED:The shutdown was planned. The system generates a System State Data (SSD) file. This file contains system state information such as the processes, threads, memory usage, and configuration.If this flag is not present, the shutdown was unplanned.Notification and reporting options are controlled by a set of policies.For example, after logging in, the system displays a dialog box reporting the unplanned shutdown if the policy has been enabled.An SSD file is created only if the SSD policy is enabled on the system
See https://msdn.microsoft.com/en-us/library/aa376885(v=vs.85).aspx
Metadata
Release files for WinUtils 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| WinUtils-1.1.2.tar.gz | 4.1 kB | Without provenance | Details for WinUtils-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| WinUtils-1.1.2-cp37-cp37m-win32.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-32 | Details for WinUtils-1.1.2-cp37-cp37m-win32.whl |
Total release size: 17.9 kB
Release files / WinUtils-1.1.2.tar.gz
| Download URL | WinUtils-1.1.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdb9f0530286950219971c86e76b092f2cc814953602669d957a6fb70b1a302c
|
|
BLAKE2b-256 checksum How to use checksums |
24dc3cb4ae2f54ce5660c2894a722caaa27a20deb41315aa4519f10ac2aa087b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / WinUtils-1.1.2-cp37-cp37m-win32.whl
| Download URL | WinUtils-1.1.2-cp37-cp37m-win32.whl |
|---|---|
| Size | 13.8 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2a5e6c979afdbc8a20635233c425263713861e7c32413620c32b732a1d87d342
|
|
BLAKE2b-256 checksum How to use checksums |
b9001d6dd25d6c6e9783cdb7616af6ecd9317716d3644dd23a748fe591f73e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for WinUtils 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.