unattended win10 install no admin access

Discussions about using Windows guests in VirtualBox.
Locked
galto
Posts: 1
Joined: 13. Nov 2022, 08:50

unattended win10 install no admin access

Post by galto »

Post unattended install, the created user account doesn't have admin rights, and the admin account is disabled. The disabled administrator account does have the specified password.
How do I get administrative rights to install software?

I am setting up an unattended windows install.
I used the command
VBoxManage unattended install win10 --iso=Windows10.iso --user=myuser --password=secret --install-additions --time-zone=UTC --additions-iso=/usr/share/virtualbox/VBoxGuestAdditions.iso --post-install-command='VBoxControl guestproperty set installation_finished y'

The install went okay. But guest additions didn't get installed. No big deal, I'll install them. But I can't.
Now, the user that I added doesn't have admin privileges (can't execute as administrator) because of security, the administrator account is disabled.

How do you specify the user type as part of an install?
carlsmithmeuk
Posts: 1
Joined: 4. Dec 2022, 01:40

Re: unattended win10 install no admin access

Post by carlsmithmeuk »

I had exactly the same problem and came across your post.

I found this thread which explains how to activate the administrator account, from there, you can change the user account type or use the admin account credentials (which are Administrator, and the same password that you entered for the unattended install)
How to get admin access:
1.) Boot into safe mode. You can do this easiest by opening a command prompt (start menu -> type 'cmd'). And type "shutdown /r /o".
2.) You computer will begin to restart but give you a set of troubleshooting options. Choose Troubleshooting -> Advanced Options -> Startup Settings.
3.) After restarting and entering safe mode, switch users by going to the start menu -> click your username -> and choose Administrator. (Windows 10: hover over the left hand options for it to pop up)
4.) Windows will begin the first-time initialization for this account.
5.) Once logged in, open the command prompt again, this time as an admin. (Right click -> Run as Admin).
6.) Type "net user Administrator /active:yes" To set the admin account as "active". It will now show up outside of safe mode.
7.) Reboot your machine and log in as the admistrator again. You can now add users and play with permissions etc. (The metro options are not available in safe mode, hence the reboot).
Source: Microsoft Answers - 98ea7298-7063-4189-9d0e-5b27a4e41314

It worked for me, so hope it works for the next person that gets stuck
Locked