Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In a network with Windows XP and Windows 2003 as DC, I need to force users to answer a survey "on login".

What needs to happen is this:

  1. User writes login and password
  2. Logs on successfully
  3. The survery software starts, and the user answers the multipe-option questions.
  4. If the user answers all the questions and clicks ok, the logon process continues normally
  5. If the user closes the program, or for whatever reason it doesn't answer all the questions, he will not be able to continue.

Any suggestions on how to achieve this?

share|improve this question
1  
I don't see the reason for close votes. This is absolutely in-scope. Although I would hate to be in an environment that was implementing something like this, and hate to be stuck implementing it, and would fight to make it understood how stupid an idea this is, doesn't mean that the question is wrong for this site. –  mfinni Jan 9 '13 at 4:05

1 Answer 1

up vote 3 down vote accepted

Yes. First, figure out how you are going to implement the survey. You can just use command prompt responses and output it to a file on a network location, you can use some software or build your own, etc. This is well outside of the scope of ServerFault. A basic requirement is that it must be able to deliver exit codes based on whether or not the user completes the survey.

Then, once you have figured out how you are going to deliver the survey, write a script that launches the program/subscript, waits for an exit code, and then acts from there. It must also detect if the program's window has gone out of focus. If the exit code is bad or the window goes out of focus (or even a time limit has been achieved), force a logout.

You might want to first deliver a message box that informs the user of the requirement of the window to stay in focus; otherwise, they may be very frustrated. Alternatively, your program or sub-script can just force the window to stay in focus.

If all goes well, allow the user to carry on by just having the script finish.

Finally, use Group Policy + Login scripts to deliver the script to the target users.

This method will still allow the user to see his desktop, and perhaps do a bit of stuff before the program executes, so it is not perfect. But this is the best way I can think of off the top of my head.

share|improve this answer
    
Hi, thanks for answering, you write that "A basic requirement is that it must be able to deliver exit codes based on whether or not the user completes the survey" How do I configure Group Policy to respond to a particular exit code? –  Luxspes Jan 8 '13 at 22:19
    
You don't... the only thing Group Policy does in my solution is run that particular login script. The script could launch a PowerShell script, which can wait for a particular exit code. –  tacos_tacos_tacos Jan 8 '13 at 22:24
1  
In other words GP kicks off the script, and the script itself is responsible for the enforcement. –  tacos_tacos_tacos Jan 8 '13 at 22:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.