Question

I have got a custom GINA (Windows Server 2003 R2) that is launching a modal window within WlxLoggedOnSAS and WlxLoggedOffSAS that contains all my workflow. It chains to MS GINA.

When I try to execute a remote script using telnet (like shutdown), it fails. Does any one know why this happens? And is there a way to handle this? Possibly handle an event in the GINA?

I have been hunting for a solution for a while and haven't found any.

Was it helpful?

Solution

I managed to figure this out. Just answering my own question for the benefit of anyone else running into the same scenario. Basically, I have classified GINA in 3 states -

  1. Secure Access Seq (CAD) Screen : This is the one which prompts users to type in Ctrl-Alt-Del. Remote telnet commands will work here.

  2. WlxLoggedOffSAS Screen : This is the login state where the custom GINA UI or MS GINA UI gets created. Generally, this thread is blocked. At this point, remote shutdown commands won't work. To deal with this situation, read on.

  3. WlxLoggedOnSAS Screen : This is the desktop lock state where the custom GINA UI or MS GINA UI gets created. At this point, the shutdown command will work with the /f switch (force shutdown).

To get around state 2, you can do one of two things:

  1. Use something like Windows Task Scheduler to initiate the restart.
  2. Add a new method to your custom GINA DLL that essentially switches to the CAD screen (state 1). You can invoke that DLL method using rundll32.exe. One switched to state 1, just invoke the shutdown and it will work.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top