|
-
Mar 14th, 2012, 11:29 AM
#1
[RESOLVED] Delete User Profile From Within User Profile
This is an odd situation. My company, among other things, restores operating systems for notebook HDDs. After the restore process, the unit is sent back to the customer and they're presented with the typical Windows OOBE screen.

But our customer wants us to take a sample of these units and log in, as if they were the customer. Afterwards, we need to reseal it so it goes back to the OOBE screen.
All of that is simple and straight forward. I have no problem doing any of that.
But, if I just re-seal it via the sysprep tool, then the user account my quality team creates will stay on the machine.
That's actually really easy to delete. Via command line we can use net user [username] /del. But, what we can't do, is use that while logged into the account. It throws an error each time.
So the only way I can think of, would be to have them log into the built in Administrator account and do it. But that's a lot of redundant work, so I'd like to avoid that.
But if I went that route, it would basically pan out like this.
1. Create account
2. Enable Administrator account
3. Log into Administrator account
4. Delete first account
5. Disable Administrator account
6. Reseal
Ideally, I'd like it to be something like this:
1. Create account
2. Delete account
3. Reseal
So is there any way to maybe set the account to delete pending a restart or something?
Thanks
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 14th, 2012, 02:59 PM
#2
Re: Delete User Profile From Within User Profile
Sorry, this is a developer site, not a PC tech site. Have you tried TechNet Forums?
-
Mar 14th, 2012, 03:35 PM
#3
Re: Delete User Profile From Within User Profile
 Originally Posted by dilettante
Sorry, this is a developer site, not a PC tech site. Have you tried TechNet Forums?
I know it's a developers site. Why else would I be here? A tech site probably wouldn't be able to help because this is a lot more involved in the OS than what they're used to.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 15th, 2012, 02:15 PM
#4
New Member
Re: Delete User Profile From Within User Profile
Actually, this is exactly the type of question that the TechNet site is for... IT Pro related questions.
Have you used sysprep in audit mode? With one command, you can enable the administrator account, bypass Windows Setup, and log in as the local admin. From there, you would delete your company account and then run sysprep with the reseal option. Running sysprep the final time will re-disable the admin account also. Please note that in the later versions of sysprep, the reseal switch was replaced with the /generalize /oobe options as mentioned here.
So to redefine your process:
1. create account
2. sysprep /audit
3. delete account
4. sysprep /generalize /oobe
For more information on sysprep's audit mode, please see this page. This was written for Vista, but still applies to Windows 7.
Hope this helps,
David
Windows Outreach Team - IT Pro
The Springboard Series on TechNet
-
Mar 15th, 2012, 02:21 PM
#5
Re: Delete User Profile From Within User Profile
 Originally Posted by WinOutreach4
Actually, this is exactly the type of question that the TechNet site is for... IT Pro related questions.
Have you used sysprep in audit mode? With one command, you can enable the administrator account, bypass Windows Setup, and log in as the local admin. From there, you would delete your company account and then run sysprep with the reseal option. Running sysprep the final time will re-disable the admin account also. Please note that in the later versions of sysprep, the reseal switch was replaced with the /generalize /oobe options as mentioned here.
So to redefine your process:
1. create account
2. sysprep /audit
3. delete account
4. sysprep /generalize /oobe
For more information on sysprep's audit mode, please see this page. This was written for Vista, but still applies to Windows 7.
Hope this helps,
David
Windows Outreach Team - IT Pro
The Springboard Series on TechNet
You misunderstand the question. I can't log into it via audit mode. What you're suggesting is exactly what I said I wanted to avoid.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 15th, 2012, 02:51 PM
#6
New Member
Re: Delete User Profile From Within User Profile
Well, maybe we are misunderstanding each other. You did not mention audit mode at all in your post. However, there are alternatives. Take a look at this article "Add a custom script to Windows Setup".
This works in the OOBE phase of the unattend.
Hope this helps,
David
Windows Outreach Team - IT Pro
-
Mar 15th, 2012, 02:53 PM
#7
Re: Delete User Profile From Within User Profile
 Originally Posted by WinOutreach4
Well, maybe we are misunderstanding each other. You did not mention audit mode at all in your post. However, there are alternatives. Take a look at this article "Add a custom script to Windows Setup".
This works in the OOBE phase of the unattend.
Hope this helps,
David
Windows Outreach Team - IT Pro
Hm... running a script after setup completes should work. Thanks for the info. I was thinking I could only complete this programmatically.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|