473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ClickOnce Questions

Hello!

I've a few questions about ClickOnce in VisualStudio 2005. The
installation of my application works fine, I published the files on a
webserver and installed the app on a winxp client, updates works also
fine. But here's my first question:

- Our app produces xml-files on startup, which stores several
informations like gui-settings etc...now when I publish a new version
and my app updates, this xml-files rested in the old folder and weren't
copied to the new one -so my app lost this settings...the same problem
with the logfiles? Any suggestions on this issue? How can I copy the
xml-files to the new folder during an update?

An additional question on this first one:

- How can I delete this additional files during an uninstall?

- How can I handle it, that our supporters find the log-file easy,
because the location changes from machine to machine?

Thanks,
Peter
Jul 12 '07 #1
3 3768
First, please don't multi-post. If you want to ask the same question in
multiple groups, post to all of them at once, so if someone answers the
question, it's displayed in all groups.

1) XML files

If you include those with a Build Action of Data and mark them as "Copy
always" or "Copy if newer", they get put in the Data directory on the
client machine, accessible through code using
ApplicationDeployment.CurrentDeployment.DataDirect ory.

If they don't change with subsequent versions, they get copied from the
previous version's DataDirectory to the new version's DataDirectory.

If they do change on the server (in any way, even just the time stamp), the
new ones get copied from the server to the new version's DataDirectory on
the client machine, but the old ones are copied from the old version's
DataDirectory to a subfolder in the new version's DataDirectory, called
\.pre . You can access that through code. I believe that the fact that it
exists is reason enough to know you have an upgraded version.

If this is user settings, and you are creating it the first time the user
runs the application, try storing it in the Vista-approved location of
(Environment.GetFolderPath(Environment.SpecialFold er.LocalApplicationData)
That's what we do; we create a folder there with the name of our product,
and store our user config files there, so we don't have to worry about them
being moved in a ClickOnce installation.

This goes to the LocalSettings under the user's profile.

2) "Delete additional files" -- what does this mean? What additional files?
CLickOnce can't do this for you, but you can write a program to do this and
have the Bootstrapper run it.

3) "log file" -- what log file? Is it a log file that you are creating? You
need to put anything like this in the LocalSettings under the user's
profile. Unless you ask the user for the location, there is nowhere you can
put it that you are guaranteed access to, especially with the advent of
Windows Vista. The safest place is the one mentioned above, and give the
user a button that will open and display the log file.

There is a great book on ClickOnce by Brian Noyes that anyone using it
should check out. It helped me immensely.

Robin S.
-----------------------------------------------

"Peter Wyss" <pe****************@timeware.chwrote in message
news:uv**************@TK2MSFTNGP04.phx.gbl...
Hello!

I've a few questions about ClickOnce in VisualStudio 2005. The
installation of my application works fine, I published the files on a
webserver and installed the app on a winxp client, updates works also
fine. But here's my first question:

- Our app produces xml-files on startup, which stores several
informations like gui-settings etc...now when I publish a new version and
my app updates, this xml-files rested in the old folder and weren't
copied to the new one -so my app lost this settings...the same problem
with the logfiles? Any suggestions on this issue? How can I copy the
xml-files to the new folder during an update?

An additional question on this first one:

- How can I delete this additional files during an uninstall?

- How can I handle it, that our supporters find the log-file easy,
because the location changes from machine to machine?

Thanks,
Peter

Jul 15 '07 #2
Hy Robin,

Thanks for your answers!
2) "Delete additional files" -- what does this mean? What additional files?
CLickOnce can't do this for you, but you can write a program to do this and
have the Bootstrapper run it.
With additional files, I mean for example my log-files, stored in
(Environment.GetFolderPath(Environment.SpecialFold er.LocalApplicationData),
which I create at startup of my program...how can I manage, that the
Bootsrapper run a program, which delete this files during the uninstall?

Thanks,
Peter
Jul 17 '07 #3
I don't think you CAN do custom stuff in an uninstall of a ClickOnce app.
If I remember, I'll look it up in Brian Noyes' ClickOnce book. I don't
remember seeing anything like that in there though.
Robin S.
----------------
"Peter Wyss" <pe****************@timeware.chwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
Hy Robin,

Thanks for your answers!
>2) "Delete additional files" -- what does this mean? What additional
files? CLickOnce can't do this for you, but you can write a program to
do this and have the Bootstrapper run it.

With additional files, I mean for example my log-files, stored in
(Environment.GetFolderPath(Environment.SpecialFold er.LocalApplicationData),
which I create at startup of my program...how can I manage, that the
Bootsrapper run a program, which delete this files during the uninstall?

Thanks,
Peter

Jul 24 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mika M | last post by:
Hi! I made ClickOnce deployment for Windows Forms VB 2005 application, and it's working mostly fine. Now I have some question: 1. Is it okay when my application goes into x:\Documents and...
0
by: Magnus Bergh | last post by:
I have some questions about ClickOnce: 1) If I want to run a Clickonce published application from another program (not .NET) how should I run it, calling the application manifest file? 2) Is...
0
by: PROCOS | last post by:
I already posted this in "Framework.Setup" but I think this was the wrong newsgroup. So here we go again: ------------------------- We have a large software suite (> 200 installation files +...
8
by: Tina | last post by:
While ASP.Net is migrating toward more robust presentation by using things like AJAX I am wondering if ClickOnce will errode a lot of ASP.Net presence in Corporate Applications. I've been reading...
1
by: M O J O | last post by:
Hi, I've have searched google, but can't find a solution to my problem. Om my develloper machine, I use one app.config, but when I deploy, I need to deploy another app.config. The reason...
2
by: Jamey McElveen | last post by:
Hello, I would like to use ClickOne but we need to stagger our update process. Currently we are shipping cd's when it is time for an update. We stagger the release in waves of 250 each so our...
1
by: dongarbage | last post by:
ClickOnce almost does what I want. However, there are a couple of additional things I want to do with my application which I believe are a challenge with a ClickOnce application: 1. The...
0
by: James Wong | last post by:
Hi, 1) I want to deploy a setup file to another computer, it will publish to a web server for clickonce after run the setup file. Can I do this in VB.Net 2005? 2) How can I run the...
3
by: Ryan Liu | last post by:
hi, I like the Publish function comes with VS2008. But 3 questions remain: how to make update path to be flexiable? Because I will give those updates to my cutomers, and different cutomer will...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.