|
-
September 4th, 2009, 03:15 AM
#1
IE7 & IE8 - Administrator Rights?
Hi,
I'm developing an application that has several buttons for opening remote directories, and I use iexplore.exe to fire away explorer to get the directory listings and navigation because it has proven to be faster than listing the files directly in .NET (God knows why).
When running my application it runs as administrator but when I try to run IE7/IE8 those rights seems to be lost so I have to type in my credentials each time. Does anybody know a workaround for this?
-
September 4th, 2009, 03:40 AM
#2
Re: IE7 & IE8 - Administrator Rights?
I think I solved it myself
I stumbled across a MSDN Blog that explained the issue of admin rights:
http://blogs.msdn.com/aaron_margosis...07/175488.aspx
I reworked the application to use explorer.exe after editing a registry setting that allows Explorer.exe instances to run as separate processes which allows it to inherit administrator rights.
Code:
RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", true);
if ((int)key.GetValue("SeparateProcess") == 0)
{
key.SetValue("SeparateProcess", 1);
}
Hope this helps other people too!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|