We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 083c19e commit 2b411e5Copy full SHA for 2b411e5
1 file changed
comtypes/shelllink.py
@@ -317,26 +317,3 @@ class ShellLink(CoClass):
317
_reg_clsid_ = GUID("{00021401-0000-0000-C000-000000000046}")
318
_idlflags_ = []
319
_com_interfaces_ = [IShellLinkW, IShellLinkA]
320
-
321
322
-if __name__ == "__main__":
323
- import sys
324
- import comtypes
325
- from comtypes.client import CreateObject
326
- from comtypes.persist import IPersistFile
327
328
- shortcut = CreateObject(ShellLink)
329
- print(shortcut)
330
- ##help(shortcut)
331
332
- shortcut.SetPath(sys.executable)
333
334
- shortcut.SetDescription("Python %s" % sys.version)
335
- shortcut.SetIconLocation(sys.executable, 1)
336
337
- print(shortcut.GetPath(2))
338
- print(shortcut.GetIconLocation())
339
340
- pf = shortcut.QueryInterface(IPersistFile)
341
- pf.Save("foo.lnk", True)
342
- print(pf.GetCurFile())
0 commit comments