Skip to content

When starting PowerShell via its exe the new black icon is not applied in the Window (but in the taskbar) #5013

Closed

Description

If you launch PowerShell Core via its exe Windows PowerShell then the window icon is still the old blue one in the window (but the taskbar icon is the new black one of PR #4848). This also affect the proposed context menu in issue #5012.
EDIT: I believe this is an issue with the exe itself because when double clicking on the exe C:\Program Files\PowerShell\6.0.0-beta.7\powershell.exe itself the new icon does not get applied either.

Steps to reproduce

Either double click on C:\Program Files\PowerShell\6.0.0-beta.7\powershell.exe or execute in Windows PowerShell:
Start-Process "C:\Program Files\PowerShell\6.0.0-beta.7\powershell.exe"

Expected behavior

The icon in the window and taskbar should both be the new black ones.

Actual behavior

The icon in the window is the old blue icon but the taskbar icon is the new black one.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta.7
PSEdition                      Core
GitCommitId                    v6.0.0-beta.7-84-gee902a649e0b803b3db4619f7eeeadea5e60d0e6
OS                             Microsoft Windows 10.0.15063
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


Activity

  1. changed the title [-]When starting PowerShell via Windows PowerShell the new black icon is not applied in the Window[/-] [+]When starting PowerShell via its exe the new black icon is not applied in the Window (but in the taskbar)[/+] on Oct 4, 2017
  2. added
    WG-Maintainers-Build
    on Oct 4, 2017
  3. added this to the milestone on Oct 4, 2017
  4. SteveL-MSFT commented on Oct 4, 2017

    @SteveL-MSFT
    Member

    The icon is really only applying to the shortcut as the .exe itself doesn't have the icon embedded in its resources. Proper fix is to add the icon the the resources of the exe, but that's not currently a priority.

  5. iSazonov commented on Oct 5, 2017

    @iSazonov
    Collaborator

    It seems dotnet/cli don't still support embedding custom icon in exe. 😕 https://github.com/dotnet/cli/issues/3267

  6. SteveL-MSFT commented on Oct 5, 2017

    @SteveL-MSFT
    Member
  7. added
    Hacktoberfest
    Up-for-Grabs
    on Oct 5, 2017
  8. bergmeister commented on Oct 5, 2017

    @bergmeister
    ContributorAuthor

    Ilya (@iSazonov) I don't understand how this can be an issue with the dotnet cli because my thinking is that the old blue PowerShell icon must come from somewhere. Or is this a red herring because PowerShell Core is somehow linked to Windows PowerShell?

  9. SteveL-MSFT commented on Oct 5, 2017

    @SteveL-MSFT
    Member

    Christoph Bergmeister (@bergmeister) I think the OS is doing something there to show the blue icon from Windows powershell.exe

  10. bergmeister commented on Oct 5, 2017

    @bergmeister
    ContributorAuthor

    Hmm, yes probably. I just found that this issue seems to be a duplicate of #2883

  11. bergmeister commented on Oct 5, 2017

    @bergmeister
    ContributorAuthor

    Steve Lee (@SteveL-MSFT) I manually tried .\rcedit-x64.exe "path-to-powershell.exe" --set-icon "path-to-black-icon" and although it changes the icon that is displayed in explorer.exe, it did not change the icon of the window when launching PowerShell. However when pointing rcedit to a HelloWorld .Net Core 2.0 console app exe, it worked (i.e. the icon also got applied to the Window icon). This suggest to me that somewhere in the Windows OS there is some registry key that overrides the icon for powershell.exe. Maybe this issue is a case for a rename to psh.exe? (JK)

  12. added
    Resolution-Duplicate
    and removed
    Hacktoberfest
    Up-for-Grabs
    on Oct 5, 2017
  13. SteveL-MSFT commented on Oct 5, 2017

    @SteveL-MSFT
    Member

    Yes, think is a dupe of #2883

    Agree that it's quite possible that the icon is associated to the powershell.exe process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-DuplicateWG-Maintainers-Build

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions