MS VS Installer Projects 2022 - Desktop shortcut icon is not displayed

perfect code 271 Reputation points
2023-01-16T13:25:29.7766667+00:00

In the community forum I could already find a few posts with the same topic, but that could not help me (the problems occurred, for example, because one has not created a shorcut in the project).

What I have done so far:

  • under Application Folder I have first added my icon
  • then I created a shortcut under Application Folder, User's Desktop and User's Programs Menu and selected the icon from Application Folder under Properties.

Now when I create the setup I don't get an error message but after the installation a standard MS icon is displayed on the desktop / in the menu and not the icon of my application.

But with the previous version of Installer it worked fine.

Where is my mistake?

Thanks

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,221 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,053 questions
{count} votes

Accepted answer
  1. RLWA32 45,701 Reputation points
    2023-01-17T08:41:32.82+00:00

    There is no need to add the icon as a separate file. You want the shortcut to display the icon of your installed executable. If you look carefully at the image that I posted you can see that the target of the shortcut is the published items. Obtain the icon from the published items.

    To add the icon from the published items -

    BrowseIcon1

    Navigate as shown above and click "OK". Another Dialog opens as shown below -

    BrowseIcon2

    Select the icon and click OK.

    1 person found this answer helpful.
    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. RLWA32 45,701 Reputation points
    2023-01-16T14:23:39.3166667+00:00

    Following is used in an installer project that puts a shortcut to the installed application on the user's desktop.

    Shortcut

    After installation -

    Desktop

    The .Net project property for resources --

    dotnetprojectpros

    0 comments No comments

  2. perfect code 271 Reputation points
    2023-01-17T07:24:47.58+00:00

    Hi RLWA32

    I also added the icon to the app first under Win32 Resources. By the way, the icon is also properly displayed in the taskbar when starting the app

    User's image

    User's image

    Then I imported the icon as a file in the Application Folder.

    User's image

    I then created a shortcut on User's Desktop and selected the icon under Properties.

    User's image

    User's image

    User's image

    However, after the setup installation, the default icon appears on the desktop:

    User's image

    Where did I miss something?

    0 comments No comments

  3. perfect code 271 Reputation points
    2023-01-17T09:43:38.74+00:00

    Thank you. I've done it exactly the same way now (that's different in a few places than I did). And that will probably be the reason why the icon was not displayed.

    Unfortunately the default icon still comes up. I thought it might have something to do with cash and wanted to install Setup on a different machine. Unfortunately I get an error message there before Setup is even started.

    It is Windows 10 Pro. When I start Setup.msi or Setup.exe, the following window appears immediately:

    User's image

    Then in the log file there is the following:

    The following properties have been set:

    Property: [AdminUser] = true {boolean}

    Property: [InstallMode] = HomeSite {string}

    Property: [NTProductType] = 1 {int}

    Property: [ProcessorArchitecture] = AMD64 {string}

    Property: [VersionNT] = 10.0.0 {version}

    Running checks for package 'Microsoft .NET Framework 4.7.2 (x86 und x64)', phase BuildList

    Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'

    Read integer value 528372

    Setting value '528372 {int}' for property 'DotNetFull_Release'

    Reading value 'v4' of registry key 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\OS Integration'

    Read integer value 1

    Setting value '1 {int}' for property 'DotNetFull_OSIntegrated'

    Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\1031'

    Read integer value 528372

    Setting value '528372 {int}' for property 'DotNetFullLangPack_Release'

    Reading value 'LCID' of registry key 'HKLM\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\de-DE'

    Read integer value 1031

    Setting value '1031 {int}' for property 'DotNetFullLangPack_OS_LCID'

    Reading value 'v4' of registry key 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\OS Integration'

    Read integer value 1

    Setting value '1 {int}' for property 'DotNetFullLangPack_OSIntegrated'

    The following properties have been set for package 'Microsoft .NET Framework 4.7.2 (x86 und x64)':

    Property: [DotNetFullLangPack_OSIntegrated] = 1 {int}

    Property: [DotNetFullLangPack_OS_LCID] = 1031 {int}

    Property: [DotNetFullLangPack_Release] = 528372 {int}

    Property: [DotNetFull_OSIntegrated] = 1 {int}

    Property: [DotNetFull_Release] = 528372 {int}

    Running checks for command 'DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-ENU.exe'

    Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true

    Result of checks for command 'DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-ENU.exe' is 'Bypass'

    Running checks for command 'DotNetFX472\NDP472-KB4054531-Web.exe'

    Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false

    Result of running operator 'ValueGreaterThan' on property 'DotNetFull_Release' and value '461808': true

    Result of checks for command 'DotNetFX472\NDP472-KB4054531-Web.exe' is 'Bypass'

    Running checks for command 'DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-DEU.exe'

    Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNetFullLangPack_Release' and value '461808': true

    Result of checks for command 'DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-DEU.exe' is 'Bypass'

    Running checks for command 'DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-DEU.exe'

    Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNetFullLangPack_Release' and value '461808': true

    Result of checks for command 'DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-DEU.exe' is 'Bypass'

    'Microsoft .NET Framework 4.7.2 (x86 und x64)' RunCheck result: No Install Needed

    Launching Application.

    Error: Die Anwendungsdatei "Setup.msi" kann nicht gefunden werden.

    Translate => Error: The application file "Setup.msi" cannot be found.

    I have exactly the same error message also on a laptop, Windows 10 is also installed there.

    On the development server (Windows Server 2022 standard) a setup works without problems.

    A search on the Internet resulted in absolutely nothing! It is also difficult to hit the right term that would give me results in Google.

    Any ideas?


  4. perfect code 271 Reputation points
    2023-01-17T11:20:49.2166667+00:00

    MSI file was missed, now it works :)


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.