473,378 Members | 1,498 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,378 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 3767
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.