Unknown Publisher window for click once when I try to install code signed application

Bhilare, Tushar S 0 Reputation points
2023-08-23T10:17:17.45+00:00

I have code signed the desktop application and craeted setup.exe using ClickOnce installer. It is showing Unknown Publisher window for click once when I try to install code signed application.

Below Messages are appeared on setup.exe window:-

User's image

How to resolve this problem. Please suggest any solution for this.

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
937 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,411 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,902 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
1,063 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 49,216 Reputation points Microsoft External Staff
    2023-08-24T05:54:17.3266667+00:00

    Hi, @Bhilare, Tushar S

    Thank you for posting in Microsoft Q&A forum.

    To resolve the "Unknown Publisher" window for ClickOnce when installing a code-signed application, you need to sign the Setup program using SignTool.exe. By default, ClickOnce has signed manifests and a signed Setup program. However, if you want to change the parameters of the Setup program later, you must sign the Setup program later. If you change the parameters after the Setup program is signed, the signature becomes corrupted. The following procedure generates unsigned manifests and an unsigned Setup program. Then, ClickOnce signing is enabled in Visual Studio to generate signed manifests. The Setup program is left unsigned so that the customer can sign the executable with their own certificate.

    To generate an unsigned Setup program and sign later:

    1. On the development computer, install the certificate that you want to sign the manifests with.
    2. Select the project in Solution Explorer.
    3. On the Project menu, click ProjectName Properties.
    4. In the Signing page, clear Sign the ClickOnce manifests.
    5. In the Publish page, click Prerequisites.
    6. Verify that all the prerequisites are selected, and then click OK.
    7. In the Publish page, verify the publish settings and then click Publish Now. The solution publishes the unsigned application manifest, unsigned deployment manifest, version-specific files, and unsigned Setup program to the publishing folder location.
    8. In the Publish page, click Prerequisites.
    9. In the Prerequisites dialog box, clear Create setup program to install prerequisite components.
    10. In the Publish page, verify the publish settings and then click Publish Now. The solution publishes the signed application manifest, signed deployment manifest, and version-specific files to the publishing folder location. The unsigned Setup program is not overwritten by the publish process.
    11. At the customer site, open a command prompt.
    12. Change to the directory that contains the .exe file.
    13. Sign the .exe file with the following command: For example, to sign the Setup program, use one of the following commands:
    signtool.exe sign /f <path to pfx file> /p <password> /t http://timestamp.digicert.com <path to setup.exe>
    

    Replace <path to pfx file> with the path to your PFX file, <password> with the password for your PFX file, and <path to setup.exe> with the path to your Setup program.


    References:


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


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.