Storing the files in clickonce deployement to a Particular folder In client machine using clickonce deployement
- Hi All,
i am using the click once deployement i have installed the application in server and by using the publish. htm i am deploying the aplication in client machine .everything going fine.
But the files are stored in under documents and settings\UserAccount\local settings.
is there any way to store these files in a particular folder?
Answers
Hi sreelakshmimadhu,
No, there isn't. One of the design goals for ClickOnce deployment is not to require the user to have administrative privileges in order to install the application. For this to be true, the application must install under the user's profile. In Windows Vista and Windows Fabulous (a/k/a Windows 7), you can not write to, say, Program Files, without administrative privileges and w/o prompting the user.
Why do you want to store the files in a specific folder?
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- Marked As Answer byLing WangMSFT, ModeratorSunday, November 08, 2009 5:26 PM
Well, first of all, you can't.
Second of all, the client shouldn't be messing with the files in the deployment folder, which is why Microsoft makes it difficult to locate under the user's profile.
If he runs the application by double-clicking on the exe rather than by using the ClickOnce shortcut, it does not run as a ClickOnce application, and won't ever get updates.
Also, when you deploy an update, it creates a whole new folder on the client machine. You should definitely not cache any data that the user updates in the same folder as the application. Here's a posting about where to keep your data:
http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/
You can also copy files over to the user's MyDocuments folder if it is something he needs to be able to access.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- Marked As Answer byLing WangMSFT, ModeratorSunday, November 08, 2009 5:26 PM
All Replies
Hi sreelakshmimadhu,
No, there isn't. One of the design goals for ClickOnce deployment is not to require the user to have administrative privileges in order to install the application. For this to be true, the application must install under the user's profile. In Windows Vista and Windows Fabulous (a/k/a Windows 7), you can not write to, say, Program Files, without administrative privileges and w/o prompting the user.
Why do you want to store the files in a specific folder?
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- Marked As Answer byLing WangMSFT, ModeratorSunday, November 08, 2009 5:26 PM
- Hi RobinDotNet,
Thanks for ur response.
The requirement is for my client they want to store the files in a specified folder for easy acess.
specified folder means the folder in d drive like that. Well, first of all, you can't.
Second of all, the client shouldn't be messing with the files in the deployment folder, which is why Microsoft makes it difficult to locate under the user's profile.
If he runs the application by double-clicking on the exe rather than by using the ClickOnce shortcut, it does not run as a ClickOnce application, and won't ever get updates.
Also, when you deploy an update, it creates a whole new folder on the client machine. You should definitely not cache any data that the user updates in the same folder as the application. Here's a posting about where to keep your data:
http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/
You can also copy files over to the user's MyDocuments folder if it is something he needs to be able to access.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- Marked As Answer byLing WangMSFT, ModeratorSunday, November 08, 2009 5:26 PM


