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 6037987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:09:12+00:00 2026-05-23T06:09:12+00:00

In .NET, when creating a setup project the application files are stored in a

  • 0

In .NET, when creating a setup project the application files are stored in a path similar to this:

C:\Program Files\[Manufacturer]\[Product Name]

I am generating a folder inside of the common application data so I can read/write on Win 7 without admin privileges, so I also generated a folder at this path:

C:\ProgramData\[Manufacturer]\[Product Name]

What’s the best way to get this path in code so I can read/write to this folder?

I could just put the manufacturer name in a constant string and keep it in sync. Or I could add it to the assembly manifest of one of the projects. Or I could try to save it out to file during the setup?

Any suggestions?

  • 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-23T06:09:13+00:00Added an answer on May 23, 2026 at 6:09 am

    I don’t think I would do anything in setup other than create the directory. Let the application manage getting to the directory at runtime.

    I would save your Manufacturer and Product Name in a config file or a hard coded constant in your code. You could also do some kind of reflection to look it up from the assembly, but this is overkill in my mind.

    For the ProgramData directory, use the %ALLUSERSPROFILE% environment variable to get the location. That way it would work across all versions of windows.

    Then concatenate the environment variable and manufacturer / product name to build the entire directory.

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

Sidebar

Related Questions

While creating the setup for VB.net application I am getting the following warning: Warning
I asked this Can I automate creating a .NET web application in IIS? a
I've got an ASP.NET application that I installed by creating a web setup. I
I'm creating a setup project for WCF net-tcp service. One thing I came across
I've created a setup project for a VB.NET 2010 application that I've written. The
Setup: I'm creating a .NET WinForms application in C# to allow our technical support
i am publishing an app in vb.net. it's creating setup.exe and a folder called
I am creating a .NET application (C#) that needs to use a lot of
I am creating a .NET form application in Visual Studio 9. In the designer
In Visual Studio 2008 (and others) when creating a .NET or silverlight application if

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.