Jump to content

Change administrator account login to another user


Recommended Posts

Hi.

Here's my problem. I am trying to do an unattended install of Windows XP. So far all is ok, but I have asked that a .bat file be run in the [GuiRunOnce] section that is located on a server on my domain, but because I don't log in as a member of the domain by default it says that it cant find the file - obviously because I don't have authority to do so.

I found out how to add a user account from the domain but now I want to log on as this account instead not as the local administrator account.

Any ideas would be appreciated. :thumbup

Link to comment
Share on other sites


Three Step Process

1. Make a file oobeinfo.ini and place it in '\$OEM$\$$\SYSTEM32\OOBE'.

Contents of oobeinfo.ini:

[UserInfo]
Identity000="User1"
Identity001="User2"
Identity002="User3"

Replace User1, User2 etc. with your names. You can add upto six users thru this process.

2. Make a file 'autologon.reg' and run it thru 'cmdlines.txt'.

Contents of autologon.reg:

Windows Registry Editor Version 5.00 

; Logs in user "User1" the first time.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="User1"
"DefaultPassword"=""
"AutoAdminLogon"="1"

3. Make a file stopautologon.reg and place it in '$OEM$\$1\INSTALL\LOGON' and run it at guirunonce stage via 'Start.cmd' or 'RunOnceEx.cmd' whichever it is you are using.

Contents of stopautologon.reg:

Windows Registry Editor Version 5.00 

; Stop further Auto-Logins
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"=""
"DefaultPassword"=""
"AutoAdminLogon"="0"

Start.cmd entries to run stopautologon.reg:

ECHO.
ECHO Stopping Auto Logon in Future
start /wait regedit /s %systemdrive%\Install\Logon\stopautologon.reg

Link to comment
Share on other sites

You could alternately log in as administrator but map to the network resource with the 'net use' command, using an account with the necessary domain rights. For example:

net use p: \\myserver\public /user:mydomain\username mypassword

Of course, if the batch file that you are calling needs to access other domain resources, this method would take additional work.

Link to comment
Share on other sites

you should use vmware or virtual pc to test out your cd before burning it

Actually VMWare is no good for testing this particular feature of an unattended install. My CD uses the above method for creating Users and for automatically logging in 'User1' and it works flawlessly but when I try the same CD in VMWare it always fails and gives some kind of error (I don't remember the exact language) which basically states that it cannot find the user on the domain and cannot logon the user. This is because oobe method fails to create the users in VMWare whereas it does fine on a real PC.

Bottom line, this feature cannot be tested with VMWare. But the good thing is that the method stated above does work flawlessly. By the way the credit for this must go to 'prathapml' for first suggesting it.

Link to comment
Share on other sites

You don't need to add a user from a domain at all. If what you're looking for is to autologon a domain user (ex: to run RunOnceEx), then just add the default domain in the registry where all the other autologon entries are.

And this does work with VMware. I do it regularly. Just make sure that your unattended (in my case at work RIS) joins the domain (per WINNT.SIF) and that you have VMware configured for bridged networking.

Link to comment
Share on other sites

o.O

thanks for pointing that out

maybe that's why oobe didnt work for me

but it never actually created the account, so that might be a totally different thing

You are welcome and yes you are right that is why oobe did not work for you. All you have to do is use it on a real install and believe it works just fine. By the way you are right, when trying this in VMWare oobe fails to creat the users and that is why the error regarding not being able to find the user and logon.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...
Hey, oobeinfo.ini works fine for me even in VMware/VP2k4.

Sanjay, maybe some co-incidental problem was preventing it from working.

I think it works fine in VMware when you have only a single user but not if you have multiple users. I am just guessing here and am not very sure about this.

The real reason I revived this thread is that I have run into some User login issues, but then after posting in this thread i realized there is a more appropriate thread --> Link to thread to post in.

Edited by Sanjay
Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...