sitegasra.blogg.se

How do i change program icon windows 10
How do i change program icon windows 10















#How do i change program icon windows 10 keygen#

how do i change program icon windows 10 how do i change program icon windows 10

How in the world do we know what index number to use? Here’s one way to find out: In the first line we call the SetIconLocation method and pass it two parameters: the path to the file containing the icon (in this case, C:\Windows\System32\Shell32.dll) and the index number of the icon within that file. Once we do that we’re ready to change the icon, something we can do using two lines of code: objShortcut.SetIconLocation “C:\Windows\System32\SHEL元2.dll”, 13 For information on binding to All Users’ Desktop or other special folders, see the special folder scripts in the Script Center Script Repository.Īfter binding to the folder we then call the ParseName method to bind to an individual file within that folder as you can see here, we’re binding to a file with the filename Test Shortcut.lnk: Set objFolderItem = objFolder.ParseName(“Test Shortcut.lnk”)įinally we use the GetLink property to return the ShellLinkObject object that represents the file Test Shortcut.lnk. This is the user’s desktop folder, and not the All Users’ Desktop folder.

how do i change program icon windows 10

We create an instance of the Shell.Application object, and then use the NameSpace method to bind to the user’s desktop folder. It won’t work.Īs for the script itself, we begin by defining a constant named DESKTOP and setting the value to &H10& this happens to be the value used by the Shell object to bind to the Desktop folder. Run this on your own machine or run it as a logon script just don’t expect to run it against a remote computer. ObjShortcut.SetIconLocation “C:\Windows\System32\SHEL元2.dll”, 13īefore getting into the details we should mention the fact that this particular script must be run locally that’s because it uses the Shell object, and the Shell object cannot be created on a remote machine. Set objFolderItem = objFolder.ParseName(“Test Shortcut.lnk”) Set objFolder = objShell.NameSpace(DESKTOP) Set objShell = CreateObject(“Shell.Application”) Hey, we said that was our motto, we didn’t say we actually followed it. And you know our motto here at Scripting Guys Central: the customer is always right. (And if you had flying toasters on top of that, well ….) But times have changed, and apparently people aren’t satisfied with their icons anymore: yours is the fourth or fifth email we’ve gotten in the past few weeks asking if we could demonstrate a way to change icons using a script. You know, the Scripting Guys (some of them, at least) are old enough to remember a time when you would never even think about changing an icon after all, back in those days having any icon at all was considered cool. Hey, Scripting Guy! How can I change the icon for an existing shortcut?















How do i change program icon windows 10