Jump to content

Change administrator name


Recommended Posts


Oke thanks i'll just try that... can i copy Yzöwl's code and past it infront of the cleanup.cmd?

And @rikgale

You can prefent that in a much easyer way...

set UserStart=%UserProfile%\Menu Start
DEL /Q /F "%UserStart%\Windows Update.lnk"

Thanks for the quick reply!

[edit]

This only is usefull if you have the script running on that account ofcourse :)

[edit2] @Yzöwl's

I think i understand what you mean, add the command to the cleanup.cmd file like you posted it. So that the it will be done at the moment the cmdlines.txt calls on the cleanup.cmd... right?

Link to comment
Share on other sites

oke i now have this...

renuser.exe Administrator "First Second"

inside my cleanup.cmd

like this:

cmdow @ /HID
echo off

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\UXPCD_IDENT.txt SET CDROM=%%i:

// Renaming Administrator Account
renuser.exe Administrator "First Second"           <-------First is your first name, Second you last... ofcrouse

EXIT

Were "First Second" ofcourse is my first and last name. :)

Link to comment
Share on other sites

:hello: I do know btw what ofcourse causes the problem with not being able to log in automaticly...

Because the name and profile did change, but, the log-in that is filled in is still Administrator.

So we have to change the name that he automaticly fills in...

Is there a way to tell windows which username to use when logging in.

tnx for the help so far :D

[edit]

Maybe found a way?

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Username"

Have not tryed it yet!

Link to comment
Share on other sites

Well my regtweak worked...

So to get the Documents and Settings folder plus you login name to change, but still be able to use autologin, you have to use this regtweak, along with the rename settings of Yzöwl...

Thanks! :hello:

Link to comment
Share on other sites

Just out of interest what does the %~dp0 do?
%0 is a variable automatically assigned to the running batch file, Cleanup.cmd. The additional parameters come from what is known as 'variable expansion and modification', where the tilde (~) expands the variable and the individual letters perform additional tasks. In this case d tells the variable to include the drive letter of the running batch, and p tells the variable to include the path of the running batch.

Therefore if your running batch, Cleanup.cmd is located in F:\UWXPCD\$OEM$\Cleanup.cmd, and renuser.exe was also in that same location, %~dp0renuser.exe would mean F:\UWXPCD\$OEM$\renuser.exe.

Link to comment
Share on other sites

  • 1 month later...
Is it possible that I change the "administrator" name/account (who has automatically created in a unattend file) renamed in "admin"?

I must change this after every unattended installation (for exclusive applications) but I would like that automatically if it is possible.

What you can do is use the BUILTIN.EXE from OptimumX.com. It works great. I have been using it a while.

Put the builtin.exe in the $OEM$ directory.

install.cmd

@echo off

ECHO Modifying Boot Timeout
START "" /WAIT "%SystemRoot%\system32\bootcfg.exe" /timeout 4

ECHO Changing the Local Admin account
START "" /WAIT "builtin.exe" /newname:WhatEverName

cmdlines.txt

[COMMANDS]
".\INSTALLS.CMD"

This will be run at T-12

Sing

Edited by singk
Link to comment
Share on other sites

  • 3 weeks later...

The link referenced above to netuser.exe is broken now. The correct version of the netuser.exe file utility can be found at http://www.jsifaq.com/ - search for tip # 570, then click on the "netuser" link to download the file.

renuser is a little harder to find, but it should not be necessary if you have the correct netuser.exe. Netuser can rename the local administrator account to "admin" via the following line:

netuser.exe administrator /name:admin

many thanks to those who posted here and to whomever wrote netuser.exe.

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...