471,356 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Inpersonate user

My company uses Active Directory.

If i'm making a windows application (deployment using ClickOnce), how
would I enable the application to add or remove entries to the windows
hosts file located in 'C:\Windows\System32\drivers\etc' ?

Aug 19 '08 #1
1 1283
Hi,

You can't really perform any custom actions in relation to deployment of a ClickOnce application.
What you can do however - is to perform some initialization routines when your ClickOnce-deployed application is first run. To check whether the application is being run for the first time, inspect the System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment.IsFirstRun property.

But - be aware that if deployed to XP and in Vista in particular you would need administrator priveledges to modify anything inside the ...\Windows folder.

/Claus Konrad
www.clauskonrad.net


"Code Monkey" <dl********@gmail.comwrote in message news:7c**********************************@a1g2000h sb.googlegroups.com...
My company uses Active Directory.

If i'm making a windows application (deployment using ClickOnce), how
would I enable the application to add or remove entries to the windows
hosts file located in 'C:\Windows\System32\drivers\etc' ?
Aug 20 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

60 posts views Thread by Fotios | last post: by
reply views Thread by Martin | last post: by
3 posts views Thread by zlst | last post: by
6 posts views Thread by martin | last post: by
2 posts views Thread by rn5a | last post: by
1 post views Thread by Carlettus | last post: by

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.