PDA

Click to See Complete Forum and Search --> : Installation/setup path for publishing application


ippy98
Mar 1st, 2010, 06:50 AM
I have been having some trouble figuring out where I configure the installation path for my published application

right now it seems to be defaulting to install in:

c:\documents and settings\username\local settings\apps\then a bunch of random gibberish folders

I'd like it to install in say c:\program files\application name etc.

I've tried changing the publishing settings but when I change the installation folder url it gives me an error like
Publish.InstallURL:
The string must be a fully qualified URL or UNC path, for example "http://www.microsoft.com/myapp" or "\\server\myapp"

jmcilhinney
Mar 1st, 2010, 07:12 AM
You don't. When you publish an application using ClickOnce its installed to the ClickOnce cache. If you want to install to a specific location then you can't use ClickOnce. That said, why do you want to install to that location? Is there a genuine reason, or just it just seem like a good idea?

ippy98
Mar 1st, 2010, 07:39 AM
Well I'd like it to be installed in some logical place where it can be accessed if needed, the path is so much gibberish it would be impossible to find.
do i just need to disable the ClickOnce?

also I'd like the installation package to include 2 necessary .xml files that are needed by the app.

jmcilhinney
Mar 1st, 2010, 07:50 AM
It's not supposed to be found, which is part of the point. ClickOnce apps are managed by ClickOnce. If the user started messing with them then ClickOnce couldn't do what ClickOnce does, which is primarily manage automatic updates. If you don't want to use ClickOnce then you can't publish your project, which is specifically creating a ClickOnce installer. If you want an installer that installs to Program Files and gives you the options you're used to then you need to use Windows Installer. You can use a VS Setup project to create a Windows Installer package or you can use a third-party tool, but VB express only supports ClickOnce as is.

Again though, is there really any actual need for it? You say "if needed". What need would there be? If there's a genuine need then that's fine, but there's no reason that you can't design your app such that there is no need. You can certainly deploy your XML files using ClickOnce and, if the user doesn't need to access them outside of the application, why would the user need to find your app's files?

ippy98
Mar 1st, 2010, 08:42 AM
A couple users will need to be able to edit the xml files occasionally.

how do i add them to deploy using clickonce?

jmcilhinney
Mar 1st, 2010, 05:38 PM
A couple users will need to be able to edit the xml files occasionally.

how do i add them to deploy using clickonce?Are you going to provide an editing facility in the application or are the files going to be edited by hand?

ippy98
Mar 1st, 2010, 08:07 PM
for now by hand, in the near future via application

jmcilhinney
Mar 1st, 2010, 08:14 PM
for now by hand, in the near future via application

As I've said a couple of times, if you use ClickOnce publishing to deploy an app then it will be installed to the ClickOnce cache and therefore the program files will be inaccessible. If you want to allow hand-editing of your XML files then you'll have to either use a different deployment method or else have your app write the XML files to somewhere specific, e.g. Application Data, on the first run.

ippy98
Mar 1st, 2010, 08:17 PM
ok, i can make them editable through the application. the first time i installed with clickonce the xml files were not included i had to add them by hand

jmcilhinney
Mar 1st, 2010, 08:52 PM
If you add the XML files to the project and ensure that their Build Action property is set to Content and their Copy To Output Folder property is set to True then they should be included in the installer. You can check that by looking at the file list on the Publish page of the project properties.

ippy98
Mar 1st, 2010, 11:31 PM
I added the files to the list and Build Action is set to Content and Copy to Output Directory is set to Copy if newer


however when i went to install it on my other machine, i started the app and got an error saying the xml was not found