Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7844675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:57:32+00:00 2026-06-02T16:57:32+00:00

Our users run our ClickOnce WPF application from the start menu / desktop shortcut.

  • 0

Our users run our ClickOnce WPF application from the start menu / desktop shortcut. When the application starts each time we need to get the URL it was originally downloaded from. I tried using the ActivationUri, but this only works when it was run directly from the website setup.exe rather than the desktop / start menu shortcut:

string activationUri = "???";
try
{
    if (System.Deployment.Application.ApplicationDeployment.CurrentDeployment == null)
    {
        activationUri = "currentDeployment is null";
    }
    else if (System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri == null)
    {
        activationUri = "deployment not null but uri is";
    }
    else if (System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri != null)
    {
        activationUri =
            System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.AbsoluteUri;
    }
}
catch (Exception ex)
{
    activationUri = ex.Message;
    //Error getting the URL so put question mark
}

MessageBox.Show(activationUri);

When run from the setup (from a website) I would get the URL, and every other time I would get “deployment not null but URI is”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:57:38+00:00Added an answer on June 2, 2026 at 4:57 pm

    Try ApplicationDeployment.UpdateLocation property. Unless you have configured a different update URL in the Project Properties -> Publish -> Updates -> Update Location in Visual Studio, it should return you the original deployment URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Many of our users, internal and external, start our web application. Then at some
Our Mac desktop application embeds WebView component from WebKit framework. Inside WebView we host
We have a script right now which our Windows users run on a Linux
Each of our users is assigned to a primary organizational unit (OU) based on
A number of our users have just upgraded from IE6 to IE7. the upgreaded
We have a WPF app that allows our users to download encrypted content and
I created a desktop application using VS 2008. When I run it locally, all
Recently two users of our software from the same company started experiencing random closures
We have an application that is run in multi-monitor environments. Users normally have the
We have a winforms application that is deployed to users through clickonce and uses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.