Jump to content

How to run your setup as a user


Recommended Posts

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

for your winnt.sif you will need to make sure these sections look like this

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=no
OEMSkipRegional=1
TimeZone="004"
OemSkipWelcome=1

[UserData]
ProductID=your product id here
FullName="User"
OrgName="My Home"
ComputerName=Computer

make sure to use whatever username you want to use. I use user.

now cmdlines.txt

".\user.cmd"

now user.cmd

CLS
@ECHO OFF
ECHO Adding Default User...
net user User /add
net localgroup "administrators" User /add
ECHO.
ECHO Applying Root Registry Tweaks...
REGEDIT /S %systemdrive%\install\Reg_Root_Tweaks.reg
ECHO.
EXIT

again here make sure to use the user name you want. I use user.

now for the reg_root_tweaks.reg

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

Link to comment
Share on other sites


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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 SECONDBOOT
DEL %SYSTEMDRIVE%\FILES\FIRSTBOOT > NUL
GOTO ENDOFSCRIPT
:SECONDBOOT

Obviously :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 by DarkPhantasmo
Link to comment
Share on other sites

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.

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