windows 7 impersonation problem

A

a

hi,

i can impersonate fine on xp, but it doesn't work on win 7 with the
same accounts set up. I get bad username/password.

i use code similar to;
http://www.codeproject.com/KB/cs/cpimpersonation1.aspx

and http://www.codeproject.com/KB/cs/zetaimpersonator.aspx

....what you'll notice that in the above 2 links, there are at least
three comments saying they can't get it to work under windows 7, and
no one responds to them.

can anyone provide any insight here on how to get it working on win 7?

thx.
 
A

a

ok I know it's not necessarily an issue specific to C#, but I still
might be able to get it to work programatically. So here is what I
have tried:

- impersonate local admin account
- map remote folder to local i.e. z:\
- set UAC to lowest setting
- change policy to allow .exe so as not to get the 'open file'
security warning' on 'downloaded' files
- use method.invoke to try and load the remote exe into memory, and
run it from there.

I am still getting 'Access to the path....is invalid'

I am trying all this while running under the admin account, so at
least the first step shouldn't be necesary, and I've tried without it.

I've also tried UNC instead of mapping the path

I can get to the remote machine thorugh file explorer and run the .exe
without any pop-ups or problems i.e. \\machinename\myapp.exe

....but something about invoking it programatically doesn't work. ie.
'Access to the path....invalid'

any help/insight here would be appreciated.
 
A

a

hmm, when i log onto the computer, it already has 2 accounts, and one
of them is 'Administrator'. I am trying to do everything while running
under that account. Are you saying I need to release a 2nd 'hidden'
administrator?

And I already have UAC at its lowest setting, which I believe is
'None'. I'd have to check again as the computer is not in front of
me...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top