Deploying to Program Files directory

Thomas Matthews picture Thomas Matthews · Feb 1, 2011 · Viewed 9.7k times · Source

I have developed a C# application and I would like to deploy it to the C:\Program Files\Company Name\Product folder. I am not seeing the "Company Name" folder created on the target machine.

I copy the files from the "published" directory onto a memory stick (thumb drive). I take the memory stick to a Windows NT machine and double click on setup.exe. The application is installed, as it appears in the *Start Menu". I have no idea where the actually destination is. I know it is not in C:\Program Files\Company Name\Product folder.

I am using MS Visual C# 2008 Express Edition Version 3.5 SP1. This product uses a severely restricted ClickOnce installer. Unfortunately, this is what I am given to work with.

How do I tell C# express to deploy my application into the C:\Program Files\Company Name\Product folder?

Sorry if this is a duplicate, as I am having a difficult time searching for any information on this issue.

Note: I am developing on 64-bit Windows 7 platform.

Edit:
I have the Title, Company, Product, Copyright, versions and GUID fields filled out on the Assembly Information dialog box. The company name is two words with a space between. Does the space cause problems?

Answer

Frédéric Hamidi picture Frédéric Hamidi · Feb 1, 2011

You cannot do that using ClickOnce, since its main advantage is that it doesn't require write access to the Program Files folder.