It's not that simple. This shortcut works for me. But when I try to open the url of the icon in the browser, nothing happens.
The registry for this address is empty. Windows was reinstalled after creating the shortcut.
I don't understand how it works?
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://stackoverflow.com/questions/41707358/how-can-i-change-icons-for-existing-url-shortcuts-using-powershell
HotKey=0
IconFile=http://admin.tairis.by/wp-content/uploads/2015/03/cropped-anykey-32x32.jpg
IconIndex=1
==================
Continuation of a story.
I've had several url-icon shortcuts that worked for me.
To test, I converted them into shortcuts created specifically for opening in Internet Explorer.
They look like this:
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
Prop4=31,Cпособ создать ярлык URL для открытия веб-страницы именно в Internet Explorer | Ваш системный администратор
[InternetShortcut]
IDList=
URL=http://admin.tairis.by/webpage-url-ie/
IconFile=http://admin.tairis.by/wp-content/uploads/2015/03/cropped-anykey-32x32.jpg
IconIndex=1
[{A7AF692E-098D-4C08-A225-D433CA835ED0}]
Prop5=3,0
Prop9=19,0
Prop2=65,2C0000000200000003000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA501000011010000C5040000690300000E
[{000214A0-0000-0000-C000-000000000046}.A]
Prop4=31,Cпособ создать ярлык URL для открытия веб-страницы именно в Internet Explorer | Ваш системный администратор
[{000214A0-0000-0000-C000-000000000046}.W]
Prop4=31,C+BD8EPgRBBD4EMQ- +BEEEPgQ3BDQEMARCBEw- +BE8EQAQ7BEsEOg- URL +BDQEOwRP- +BD4EQgQ6BEAESwRCBDgETw- +BDIENQQx--+BEEEQgRABDAEPQQ4BEYESw- +BDgEPAQ1BD0EPQQ+- +BDI- Internet Explorer +AHw- +BBIEMARI- +BEEEOARBBEIENQQ8BD0ESwQ5- +BDAENAQ8BDgEPQQ4BEEEQgRABDAEQgQ+BEA-
[{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}]
Prop5=8,Microsoft.Website.64CC9D1C.94775C5B
==============
It turns out that in my set there were 2 types of url-icon shortcuts that worked.
To see if they are cached, I moved the entire folder to another drive. Quite expectedly, the shortcuts stopped working. Everyone has stopped.
What was my surprise when, after opening the shortcuts of the Internet Explorer, they were restored. And with an unexpected rebranding of its content. (notepad++ noticed this). But these same shortcuts, with standard content, did not change their icon, as it was on previous disk.
It was surprise for me when, having opened this folder after restarting computer, the all Internet Explorer shortcuts began to show the one same icon !!! The icon with the code of which this comment began.
IconFile=http://admin.tairis.by/wp-content/uploads/2015/03/cropped-anykey-32x32.jpg
with a url that doesn't open even in a browser!
Other urls that worked for me after a kick from internet explorer:
IconFile=http://tavalik.ru/favicon.ico
IconFile=http://winitpro.ru/favicon.ico?v=3
It's just mysticism with caching performed by Windows and Internet Explorer