Unattended XML script fails when we create a standard user but works for admin
When using an unattended answer file to create a new standard user, the automatic script does not execute as expected. However, when the user is created with admin privileges, the script works fine
Ran into the same problem. The script needs to run with admin privileges to modify the registry etc., so when in logging in for the first time as a new standard user, it fails/stops immediately because of lacking privileges. Sadly even manually starting the script again using "Run as administrator" doesn't work, because then the script doesn't modify the HKEY_CURRENT_USER entries of the standard user (my guess is it's modifying the entries of the admin account used to run it?). So I doubt there is an easy way around this.
Solution (which you pretty much already described :D): create the new user as admin, log in once so it runs the script with sufficient privileges, and then downgrade the user to a standard user. Here is a quick way to create an admin account from the command line if you don't like the Windows dialogue.
Same problem for me. I'm working with domain accounts, so no way I can do that with 1000's of logins. Trying to modify it to elevate privileges, but still no luck.
Hey there and sorry for the late reply,
Since the creation of this issue I have released a new version of the XML file and a major update to Winhance, I recommend that you watch this video which provides a full demo of the current version along with how to use the new version of WIMUtil and how to install the drivers etc. You now also have the ability to create an autounattend.xml file based on your selections in Winhance, so you have more control over which apps are removed and which settings are applied.
I have also created this video about v3.0.0 of UnattendedWinstall, I suggest that you watch it too if you're interested.
In the new version, I have completely changed the way the HKCU script is executed and this issue should be resolved, because it now runs as a Scheduled Task as SYSTEM but applies the HKCU entries to the currently logged in user via PSDrive, I think that's a nice trick :)
I'm closing this issue now, but if you need more help with the same issue, feel free to reopen it.