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

  • SEARCH
  • Home
  • 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 3725088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T06:52:41+00:00 2026-05-19T06:52:41+00:00

I have developed an application in C# with an option to run at Windows

  • 0

I have developed an application in C# with an option to run at Windows startup implemented using registry (current user hive). When I run my application from VS or from the bin folder, this option works.

When I create ClickOnce installer (to be run from internet) and put it on Codeplex, after the application is installed this option does not work. No exception is thown, it just makes registry write. I suppose there is some kind of a security issue.

I tried to create a ClickOnce installer with the option to be run from a CD/local storage , after the application is installed it works. It just does not work after installing using the ClickOnce web installer (put on CodePlex).

I looked at the Publish settings, there are set to default = full trust. I really do not know what to do now to make the run at startup option work.

  • 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-05-19T06:52:43+00:00Added an answer on May 19, 2026 at 6:52 am

    Create a second (console) application, that will preform the write, and add it to the references of you original application.

    When your user starts the application, check if the registry key is set, if not run the before-mentioned console application with elevated rights. The user will be prompted for administration rights, and the write operation should succeed.

    In your main app you have to add the reference to the console app. For easier assembly reference the console app should have at least 1 public class, so that you can get it type and the types assemlby and you thus don’t have to use magic strings to get filenames. Example:

     Process.Start(
           new ProcessStartInfo
           {
               Verb = "runas",
               FileName = typeof(SomeClassInOtherAssembly).Assembly.Location,
               UseShellExecute = true,
               CreateNoWindow = true // Optional....
           }).WaitForExit();
    

    I also found this nice blog post.

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

Sidebar

Related Questions

I have developed a application for a client who uses windows 7 home premium
I have developed a window application in VS2005 using C#. I need to integrate
I have developed a Win32 application using C/C++, which runs on Vista and XP.
We have developed a web application which consumes a web service. The user will
I have developed a C# Windows Forms application that runs in the background as
VS 2008 I have developed a device application that runs on windows mobile 5.
I have developed a web application using using servlet and JSP. I am not
I have developed an application that reads files from the folder chosen by the
I have developed a client/server application using a firebird db and Delphi XE2. The
I have developed the application in which i want to set the background color

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.