Skip to main content

Casement

A Python library that provides useful functionality for managing Microsoft Windows systems.

Shortcut management

A interface for manipulating Windows shortcut files including pinned.

Pinning shortcuts to the start menu and task bar in windows is extremely complicated. You can find and edit shortcuts in the User Pinned directory for for all users, but adding, modifying or removing those shortcuts does not affect the pinned shortcuts. You need to point to a copy of the pinned shortcut, and run windows verbs on that shortcut.

Here is a example of pinning a shortcut to the start menu:

from casement.shortcut import Shortcut
with Shortcut(r'C:\Users\Public\Desktop\My Shortcut.lnk') as sc:
    sc.pin_to_start_menu()

Command line interface

The features of this class can be used from the command line using casement shortcut [command] [arguments].

To find shortcuts in common places with a given name:

    C:\blur\dev\casement>casement shortcut list "VLC media player.lnk"
    c:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN\VLC media player.lnk
    c:\Users\Public\Desktop\VLC media player.lnk

Pinning/unpinning a shortcut to the taskbar:

    C:\blur\dev\casement>casement shortcut pin "C:\Users\Public\Desktop\My Shortcut.lnk" -t
    C:\blur\dev\casement>casement shortcut unpin "C:\Users\Public\Desktop\My Shortcut.lnk" -t

Release files for casement 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for casement 0.0.1
File Interpreter ABI Platform
casement-0.0.1-py2-none-any.whl Python 2 none any Details

Release files / casement-0.0.1-py2-none-any.whl

Download URL casement-0.0.1-py2-none-any.whl
Size 12.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
f74dcb8bf73baf43166d79cf1bc8a3754899eb5787c151e59ce1f715280de4d8
BLAKE2b-256 checksum
How to use checksums
034c0ce447e645c9f5bbf4af2247a0de08c89c4feb7523b438479932dd8903ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.3

Release history Release notifications | RSS feed

0.5.0

1 release file

0.4.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page