Jump to content

How can i enter username in my unattended install?


Recommended Posts

i mean not through the winnt.sif file .

i want to be able to choose any user i'd like to in setup itself.

example :

if i have 3 computers at home , and i want for each one a different username ,

lets say john , neo and adiel . the user in winnt.sif is a parament user , that can

only changed after the windows install is finished. i want to option to set my desired user

in the install , like in regular windows cd (not unattended) i tried removing the lines

FullName

OrgName

ComputerName

but the setup complaining about parameters missing ..

is there anyway to do it?

Thanks .

Link to comment
Share on other sites


FullName

OrgName

ComputerName

Only affects the registered user, not the name of the User Account that logs in. If you want the User Account's name to change, you could script your batch file that creates your current user to prompt for the name to create. SET /P should do ya. Just type SET /? at a command prompt for syntax. SET /P displays a prompt and waits for an answer, and then stores in the variable. Then use the variables inplace of the static name your currently using.

This is the simplest off the top of my head idea, but there are others. Including use WIHU

Link to comment
Share on other sites

i didn't understand exactly how to create this batch file , and excute him during windows install.

can u create this batch file for me, and tell me how do i execute him during install?

Thanks alot , Adiel.

Link to comment
Share on other sites

Here is an exe I just created for you. Try inserting the execution of it in cmdlines.txt, before your software installation. A inputbox will popup asking for a username. Try to have no spaces or special characters.

Let me know of any problems.

UserAcc.rar

Link to comment
Share on other sites

if the thread is on page 2 , i'm still not allowed to bump?

Please wait atleast a day. After that bump, but please just wait a day. If you don't, people might start thinking your impatient. And we don't want that now do we? :P

I know I'm not the only one, but I click on the link at the bottom of the forum page that says "Today's Active Topics" and it brings up ALL new posts to the forum, regardless what page they're on....

Link to comment
Share on other sites

I have a question for you MHz regarding this UserAcc.exe file.

1. Does it take place during the initial setup of the system?

2. Is it just for the Username, or does it included a password as well?

Currently I use the Autologon.reg and Useraccounts.cmd to create the default user which is logging into this PC. This gives this user Admin rights.

3. By doing it with your UserAcc.exe program, does the account created have Admin rights?

4. Is the account setup to Autologon?

If you answer yes to at least #1, #3 and #4, I (and probably a lot of other people) could use this method instead of hard coding it via Useraccounts.cmd and autologin.reg files.

Link to comment
Share on other sites

@Powerhouse

This method is the similar as in the unattended guide, but for adding a variable and an inputbox. I use Autoit to achieve this. As for passwords, I have seen too many posts with people not being able to logon with a password, so I left this option out. You will be Admin and will autologon.

$user is the variable used.

Script is below to show these queries.

Dim $user
$key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

Sleep(2000)

; Username asked for here.
$user = InputBox('Username', 'Enter logon name', '', '', 120, 50)

; $user variable holds the info given and inserts below.
RunWait(@ComSpec & ' /c net user ' & $user & ' /add', '', @SW_HIDE)
RunWait(@ComSpec & ' /c net localgroup Administrators ' & $user & ' /add', '', @SW_HIDE)
RunWait(@ComSpec & ' /c net accounts /maxpwage:unlimited', '', @SW_HIDE)

RegWrite($key, "DefaultUsername", "Reg_SZ", $user)
RegWrite($key, "DefaultPassword", "Reg_SZ", "")
RegWrite($key, "AutoAdminLogon", "Reg_SZ", "1")

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