Jump to content

Script: Delete & Create User at shutdown or reboot [ONCE]


Recommended Posts

Posted

Hi everyone,

 

I try to make a script that removes the user on which I am logged,in to restart the computer and recreate this user.

 

I created a RunOnce key but the script and the deletion occurs only when I log on an admin session. But I need an AutoLogon on user session newly created.

 

An idea?

 

Thxs

Posted

Removes the user as in deletes their account?

 

Don't think a standard user can remove their own account, unless you're doing services etc, which would run before logon. Unless I'm missing something.

 

Steve

Posted

I would like to run a script (or other) on my session which will remove this session at shutdown or reboot and which will recreate it.

Or recharge my default profile (and default settings) on this session but I don't think it's possible.

Posted

I created a powershell script that deletes my home directory but it's not fast enough to start at boot before loging to the session.

 

Maybe with a bat It will success but the: "rmdir C:\Users\username /s /q" does'nt remove the profile entirely.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...