# Creates .lnk files on Windows (with Admin rights if desired)
## pip install lnkcreator
```python
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.
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/lnkcreator",
"name": "lnkcreator",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "lnk,shortcut,windows",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8d/72/01dc482e9c0177be84e752d6a62ed98b2396fe87c24e1cb0e550fa0c3bb4/lnkcreator-0.10.tar.gz",
"platform": null,
"description": "# Creates .lnk files on Windows (with Admin rights if desired)\r\n\r\n## pip install lnkcreator\r\n\r\n\r\n\r\n```python\r\n\t\r\n\t\t\r\nfrom lnkcreator import create_shortcut\r\ncreate_shortcut(\r\n shortcut_path=r\"C:\\Users\\hansc\\Downloads\\PJeOffice.lnk\",\r\n target=r\"C:\\Users\\hansc\\Downloads\\PJeOffice.exe\",\r\n arguments=(),\r\n minimized_maximized_normal='normal', #\r\n asadmin=True, # enables the admin check box\r\n hotkey='ctrl+x',\r\n working_dir=None, # dir of target will be used \r\n)\r\n\r\n\r\n\r\nCreates a Windows shortcut (.lnk) file at the specified path with the specified properties.\r\n\r\nArgs:\r\n\tshortcut_path (str): The path where the shortcut file will be created.\r\n\ttarget (str): The path of the target file or application that the shortcut will point to.\r\n\targuments (list): A list of arguments to be passed to the target file or application.\r\n\thotkey (str, optional): The hotkey combination to activate the shortcut. Defaults to \"\".\r\n\tworking_dir (Union[str, None], optional): The working directory for the target file or application. Defaults to None.\r\n\tminimized_maximized_normal (str, optional): The window state of the target application when the shortcut is activated.\r\n\t\tPossible values are \"minimized\", \"maximized\", or \"normal\". Defaults to \"minimized\".\r\n\tasadmin (bool, optional): If True, the shortcut will be created with administrative privileges. Defaults to False.\r\n\r\nReturns:\r\n\tstr: The JavaScript content used to create the shortcut.\r\n\r\nRaises:\r\n\tOSError: If the shortcut file cannot be created.\r\n\r\n\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Creates .lnk files on Windows (with Admin rights if desired)",
"version": "0.10",
"split_keywords": [
"lnk",
"shortcut",
"windows"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "25bc219edc1f25eca886196e02dc1db7b4b92cd955a168ef52749ada50b3c2f0",
"md5": "18fe7175dcfc4f552b3d9093ef34ddb0",
"sha256": "45721e7ad304180a0f38cd3ef49a395bf3ef7a0ea39abaa051024665f84b7182"
},
"downloads": -1,
"filename": "lnkcreator-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "18fe7175dcfc4f552b3d9093ef34ddb0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7618,
"upload_time": "2023-04-21T05:40:06",
"upload_time_iso_8601": "2023-04-21T05:40:06.807481Z",
"url": "https://files.pythonhosted.org/packages/25/bc/219edc1f25eca886196e02dc1db7b4b92cd955a168ef52749ada50b3c2f0/lnkcreator-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8d7201dc482e9c0177be84e752d6a62ed98b2396fe87c24e1cb0e550fa0c3bb4",
"md5": "e75192bd9346f27324d041d8ae13e855",
"sha256": "03c85e9ec5f1e5959fdd4fe98d1377c44b6ea3d4a0e95bbdb1304cd3f6f203e9"
},
"downloads": -1,
"filename": "lnkcreator-0.10.tar.gz",
"has_sig": false,
"md5_digest": "e75192bd9346f27324d041d8ae13e855",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5017,
"upload_time": "2023-04-21T05:40:09",
"upload_time_iso_8601": "2023-04-21T05:40:09.294774Z",
"url": "https://files.pythonhosted.org/packages/8d/72/01dc482e9c0177be84e752d6a62ed98b2396fe87c24e1cb0e550fa0c3bb4/lnkcreator-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-21 05:40:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "hansalemaos",
"github_project": "lnkcreator",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "lnkcreator"
}