tags:

views:

263

answers:

1

Hi ,

I am working on some Automation Project where one needs to perform some action related to display resolution.Change the Display resolution , Lock the Desktop and then Unlock Desktop again to check that resolution remained same.

I am able to perform LockWorkstation but unable to have any thing for Unlock Workstation. Can any body help me regarding unlocking Display with help of C# and in Win 7 ? I heard of GINA dll which can help ,but I dont know anything about it.Can this be used for Win7 and .NET 3.5?

Thanks

_Prat.

+1  A: 

I don't think that doing this is technically feasible. GINAs were deprecated after XP and the new way to provide custom authentication in Vista/Win7 is to use the ICredentialProvider interface. Even if you get this working you'll still have to somehow send the the secure attention sequence, i.e. ctrl-alt-delete, to initiate the logon. Sending ctrl-alt-delete programmatically is itself something that is difficult to do and not really supported.

This sounds like a lot of work for some automation and probably won't have much ROI. Can you test this by logging the user off completely and then logging back in? If so, then you could set your test machine to auto-logon the user. When you log-off it will shut down the session and then promptly log the user back in and you could check if the resolution is what you expect.

nick