Creates .lnk files on Windows (with Admin rights if desired)
pip install lnkcreator
from lnkcreator import create_shortcut
create_shortcut(
shortcut_path=r"C:\Users\hansc\Downloads\PJeOffice.lnk",
target=r"C:\Users\hansc\Downloads\PJeOffice.exe",
arguments=(),
minimized_maximized_normal='normal', #
asadmin=True, # enables the admin check box
hotkey='ctrl+x',
working_dir=None, # dir of target will be used
)
Creates a Windows shortcut (.lnk) file at the specified path with the specified properties.
Args:
shortcut_path (str): The path where the shortcut file will be created.
target (str): The path of the target file or application that the shortcut will point to.
arguments (list): A list of arguments to be passed to the target file or application.
hotkey (str, optional): The hotkey combination to activate the shortcut. Defaults to "".
working_dir (Union[str, None], optional): The working directory for the target file or application. Defaults to None.
minimized_maximized_normal (str, optional): The window state of the target application when the shortcut is activated.
Possible values are "minimized", "maximized", or "normal". Defaults to "minimized".
asadmin (bool, optional): If True, the shortcut will be created with administrative privileges. Defaults to False.
Returns:
str: The JavaScript content used to create the shortcut.
Raises:
OSError: If the shortcut file cannot be created.
Metadata
Release files for lnkcreator 0.10
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 |
|---|---|---|---|---|
| lnkcreator-0.10.tar.gz | 5.0 kB | Without provenance | Details for lnkcreator-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lnkcreator-0.10-py3-none-any.whl | Python 3 | none | any | Details for lnkcreator-0.10-py3-none-any.whl |
Total release size: 12.6 kB
Release files / lnkcreator-0.10.tar.gz
| Download URL | lnkcreator-0.10.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03c85e9ec5f1e5959fdd4fe98d1377c44b6ea3d4a0e95bbdb1304cd3f6f203e9
|
|
BLAKE2b-256 checksum How to use checksums |
8d7201dc482e9c0177be84e752d6a62ed98b2396fe87c24e1cb0e550fa0c3bb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / lnkcreator-0.10-py3-none-any.whl
| Download URL | lnkcreator-0.10-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45721e7ad304180a0f38cd3ef49a395bf3ef7a0ea39abaa051024665f84b7182
|
|
BLAKE2b-256 checksum How to use checksums |
25bc219edc1f25eca886196e02dc1db7b4b92cd955a168ef52749ada50b3c2f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for lnkcreator 0.10
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.