webmedic Posted September 5, 2003 Posted September 5, 2003 Ok for doing setting up users durring install you will need i386\winnt.sif$OEM$\cmdlines.txt$OEM$\user.cmd$OEM\$1\install\Reg_Root_Tweaks.regfor your winnt.sif you will need to make sure these sections look like this [GuiUnattended]AdminPassword=*EncryptedAdminPassword=noOEMSkipRegional=1TimeZone="004"OemSkipWelcome=1[UserData]ProductID=your product id hereFullName="User"OrgName="My Home"ComputerName=Computermake sure to use whatever username you want to use. I use user.now cmdlines.txt".\user.cmd"now user.cmdCLS@ECHO OFFECHO Adding Default User...net user User /addnet localgroup "administrators" User /addECHO.ECHO Applying Root Registry Tweaks...REGEDIT /S %systemdrive%\install\Reg_Root_Tweaks.regECHO.EXITagain here make sure to use the user name you want. I use user.now for the reg_root_tweaks.regWindows Registry Editor Version 5.00 ;This will allow you to autologin.;Replace InsertName value with the Username you want to autologin with.;Replace InsertPassword value with the password corresponding to the Username specified.[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"DefaultUserName"="User""DefaultPassword"="""AutoAdminLogon"="1"again make sure to use whatever user you want. I use user.now you will logon as user and everything will be installed as user.
Twisted Maniac Posted September 5, 2003 Posted September 5, 2003 net user User /addnet localgroup "administrators" User /addas far as i know it should be:net user User pass /addnet localgroup Administrators /ADD User
webmedic Posted September 5, 2003 Author Posted September 5, 2003 thanks but that is only if you are using a pass and also note that if you do that then you will need to add a pass to the reg file. Now one more thing it works like it is. Adding a pass is not mandatory.
devil270975 Posted September 5, 2003 Posted September 5, 2003 PLEASE PLEASE PLEASE twisted maniac: if you are gonna try and correct people, please ensure you are right, when someone has got the right code and you tell them it is wrong, really does not help them, there are a lot of people using this forum, a majority of which are newbies and are unsure of what to do, being given the wrong advise misleads them and confuses them, and makes it harder for advanced users to explain things because of conflicting advise...LEE
valkyre Posted September 6, 2003 Posted September 6, 2003 Thanks webmedic, I was searching all over the net for this!
Bachus Posted September 6, 2003 Posted September 6, 2003 So, can we only use HKLM registry tweaks at this point? How would HKCU work here?
spookytay Posted September 6, 2003 Posted September 6, 2003 Only local machine reg tweaks will work, you need to have the pc reboot and login for the first time as the user account you created, then you run a second registry tweak file for all the current user reg tweaks. This should also be when you run your program installation batches that require the current user to be logged in.I also set my AutoAdminLogon = "2" because I run a final batch that runs after a final reboot, to delete and cleanup shortcuts and folders; the batch file self deletes instelf.
valkyre Posted September 6, 2003 Posted September 6, 2003 How do you make the computer reboot first, then apply the batch and registry tweaks?
MadMan03 Posted September 6, 2003 Posted September 6, 2003 hmmm PROBLEM....he creates to accounts....first is Administrator the second is USER....what is the command that he creates only the Administrator account? because i had to delete user...i want to have only the administrator account....anywhere i have 2 accounts...that couldnd be right... plz help...
spookytay Posted September 6, 2003 Posted September 6, 2003 The whole point of creating the second account is so that you can install certain programs and tweaks as that user account. You don't want to really use Administrator unless that's the account you like to use. I wouldn't recommend it. I prefer my own user account, that is why they are showing the steps to create the second account.The first step is to create the account user, the second step is to add the account to the administrators group.The administrator account is created by default, it's required. However there are ways to rename it for security.
spookytay Posted September 6, 2003 Posted September 6, 2003 How do you make the computer reboot first, then apply the batch and registry tweaks?From my understanding, the stuff you want to run before the user account you add to cmdlines.txt, anything listed under [GuiRunOnce] in the winnt.sif file gets run when the user account gets logged in.Correct me on this.
devil270975 Posted September 6, 2003 Posted September 6, 2003 you are correct spooktray, if you add your reg entries in cmdlines.txt ie: the inf(windows update) or reg(windows update) setup method then there is no real need to put anything under [guirunonce]
DarkPhantasmo Posted September 6, 2003 Posted September 6, 2003 (edited) What I have done is created a seperate batch file for the items I would like to install as the user, them, at some point during the install process, i copy the batch file to the allusers startup folder and create a dummy file on the drive. In the batch file i have sometime like the following:IF NOT EXIST %SYSTEMDRIVE%\FILES\FIRSTBOOT GOTO SECONDBOOTDEL %SYSTEMDRIVE%\FILES\FIRSTBOOT > NULGOTO ENDOFSCRIPT:SECONDBOOTObviously :ENDOFSCRIPT is the line right before the EXIT line in the batch file. The firstboot file gets created during my "main_batch.cmd" file. One of the last things I do in thist batch file is delete itself from the startup folder.UPDATE:I have simplified things just a bit. In my "LAST.CMD" that gets placed in the all users startup folder does not do that IF NOT EXIST ... stuff anymore, i simply do the following:IF %USERNAME% == Administrator goto ENDOFSCRIPT{ do my stuff i want to do and then delete the LAST.CMD file from startup }:ENDOFSCRIPT Edited September 8, 2003 by DarkPhantasmo
kenneth11zz Posted September 14, 2003 Posted September 14, 2003 DarkPhantasmo,I'm new to scripting and would like to learn about how to add or use your scripts for the unattended installation by reading the codes. Is there any chance that you can zip it and upload it here to share with us? -Kenneth
webmedic Posted September 14, 2003 Author Posted September 14, 2003 I'm not sure if you refer to me but here shortly I will relese the first revision of my scripts. Right now I'm working on the user freindly part of them. This will make it so that even on a multi usert ssytem all users get the same look and feel.It's about 99% done and I'm only working on the claenup parts right now.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now