Connecting Tech Pros Worldwide Forums | Help | Site Map

Inpersonate user

Code Monkey
Guest
 
Posts: n/a
#1: Aug 19 '08
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' ?


Claus Konrad
Guest
 
Posts: n/a
#2: Aug 20 '08

re: Inpersonate user


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" <dlynes2005@gmail.comwrote in message news:7c9bdc1f-aba7-455f-9096-ea179abf1038@a1g2000hsb.googlegroups.com...
Quote:
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' ?
>
Closed Thread