-1

This may sound a little confusing, bear with me here.

I essentially want to put a system into a loop of logging off and logging in.

I've got the logging off part down. It's just a logon script.

I was thinking maybe it'd be possible to use a logoff script to log the user back on, thus creating the loop.

I've done just about all of the Googling I can.

You may be asking: "Why?" I'm trying to be a little devious to my fellow classmates. -With my teachers permission, of course.

Essentially what I'm asking is: How do I write a script that will log the user on, that can be ran as a logoff script.

The system I plan to try it on is running Win7.

The Logoff script is just a simple,

%systemroot%\system32\timeout.exe /t 3  
%systemroot%\system32\shutdown.exe /l

This just adds a small delay before logging the user off. It is ran through Logon scripts in Group Policy.

Note: I did look into the AutoAdminLogon, but that will not be useful in creating a loop as I'd like.

Note part 2: I'm aware that this inst a free code writing service, I just figured that this seemed pretty basic, and that it wasn't too much to ask.

closed as too broad by DavidPostill May 15 at 12:58

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please note that superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?. – DavidPostill May 15 at 12:58
  • Have a you looked at the registry key AutoAdminLogon? – BillP3rd May 15 at 13:01
  • AutoLogin sounds like exactly what you want.  Why isn’t it?  Please do not respond in comments; edit your question to make it clearer and more complete. – G-Man May 15 at 20:25