https://learn.microsoft.com/en-us/dotnet/api/system.deployment.application.applicationdeployment.isnetworkdeployed?view=netframework-4.8.1&redirectedfrom=MSDN
ApplicationDeployment.IsNetworkDeployed Property (System.Deployment.Application) | Microsoft Learn
Gets a value indicating whether the current application is a ClickOnce application.
property systemdeploymentapplicationmicrosoftlearn