powcshell.shelllink module#
ショートカット。
主なクラスは ShellLink です。
- class powcshell.shelllink.IShellLinkW#
ベースクラス:
IUnknown- GetArguments = <COM method offset 10: WinFunctionType>#
- GetDescription = <COM method offset 6: WinFunctionType>#
- GetHotkey = <COM method offset 12: WinFunctionType>#
- GetIDList = <COM method offset 4: WinFunctionType>#
- GetIconLocation = <COM method offset 16: WinFunctionType>#
- GetPath = <COM method offset 3: WinFunctionType>#
- GetShowCmd = <COM method offset 14: WinFunctionType>#
- GetWorkingDirectory = <COM method offset 8: WinFunctionType>#
- Resolve = <COM method offset 19: WinFunctionType>#
- SetArguments = <COM method offset 11: WinFunctionType>#
- SetDescription = <COM method offset 7: WinFunctionType>#
- SetHotkey = <COM method offset 13: WinFunctionType>#
- SetIDList = <COM method offset 5: WinFunctionType>#
- SetIconLocation = <COM method offset 17: WinFunctionType>#
- SetPath = <COM method offset 20: WinFunctionType>#
- SetRelativePath = <COM method offset 18: WinFunctionType>#
- SetShowCmd = <COM method offset 15: WinFunctionType>#
- SetWorkingDirectory = <COM method offset 9: WinFunctionType>#
- class powcshell.shelllink.ShellLink(o: Any)#
ベースクラス:
objectショートカット(.lnk)。IShellLinkWのラッパーです。
サンプル
空のショートカット作成
>>> ShellLink.create()
.lnkファイルを開いてショートカット作成
>>> ShellLink.create_from_file(path)
ストリームからショートカット作成
>>> ShellLink.create_from_stream(stream)
- property arguments: str#
- static create_fromfile(path: str | ~os.PathLike, mode: ~powc.stream.StorageMode = <StorageMode.DIRECT: 0>) ShellLink#
- property description: str#
- get_path(flags: ShellLinkGetPath) str#
- get_path_nothrow(flags: ShellLinkGetPath) ComResult[str]#
- property hotkey: int#
- property iconlocation: tuple[str, int]#
- property idlist: ItemIDList#
- property idlist_nothrow: ComResult[ItemIDList]#
- property path: str#
- property persist_file: PersistFile#
- property persist_stream: PersistStream#
- property rawpath: str#
- resolve(flags: ShellLinkResolve, window_handle: int = 0) None#
- resolve_nothrow(flags: ShellLinkResolve, window_handle: int = 0) ComResult[None]#
- set_idlist_nothrow(pidl: ItemIDList) None#
- set_path(path: str | PathLike) None#
- set_relpath(path: str) None#
- property shortpath: str#
- property showcmd: int#
- property workdir: str#
- property wrapped_obj: c_void_p#
- class powcshell.shelllink.ShellLinkGetPath(*values)#
ベースクラス:
IntFlag- DEFAULT = 0#
- RAWPATH = 4#
- RELATIVEPRIORITY = 8#
- SHORTPATH = 1#
- UNCPRIORITY = 2#
- class powcshell.shelllink.ShellLinkResolve(*values)#
ベースクラス:
IntFlag- ANY_MATCH = 2#
- INVOKE_MSI = 128#
- KNOWNFOLDER = 1024#
- MACHINE_IN_LOCAL_TARGET = 2048#
- NOLINKINFO = 64#
- NONE = 0#
- NOSEARCH = 16#
- NOTRACK = 32#
- NOUPDATE = 8#
- NO_OBJECT_ID = 8192#
- NO_UI = 1#
- NO_UI_WITH_MSG_PUMP = 257#
- OFFER_DELETE_WITHOUT_FILE = 512#
- UPDATE = 4#
- UPDATE_MACHINE_AND_SID = 4096#