LoginSignup
renbu
@renbu

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Python win32com.client.Dispatch('Shell.Application') でSetIconLocation不可?

.urlファイルのアイコン変更をPythonより試みてます。

from win32com.client import Dispatch

shell = Dispatch('Shell.Application')

shell.NameSpace(dir_path).Items().Item(filename).GetLink
shell.SetIconLocation(icon, 0)
shell.Save()

結果

    raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: Shell.Application.SetIconLocation

.lnkファイルのアイコン変更はDispatch('WScript.Shell')で可能でしたが、
.urlファイルに対しては使えないようです。
残念ながら、pythonでShell.Applicationを使用してのアイコン変更は全く情報がありません。
というかそもそも可能なのか?すら分からないです。

0

No Answers yet.

Your answer might help someone💌