Skip to content

Commit 2b411e5

Browse files
authored
shelllink.py does not need to be executable (#661)
1 parent 083c19e commit 2b411e5

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

comtypes/shelllink.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -317,26 +317,3 @@ class ShellLink(CoClass):
317317
_reg_clsid_ = GUID("{00021401-0000-0000-C000-000000000046}")
318318
_idlflags_ = []
319319
_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

Comments
 (0)