Jump to content

Default reg tweaks for new user


Recommended Posts

A bit of help wanted please.

I had assumed that if you used the HKEY_USERS\.DEFAULT key to add registry tweaks, then they would be applied to any new user created. I tried this and none of the tweaks were applied. I want to add the registry tweaks to an unattented disc using cmdlines.txt but I've only ever been able to get the HKEY_LOCAL_MACHINE tweaks to work.

What should I be doing?

Many thanks.

Link to comment
Share on other sites


add the reg keys to the HKCU during the T-12stage using the cmdlines.txt

BUT BEFORE you create any users then when you create the first user it will inherit the default users settings...

here is an example of allot of things.....

I call the T-12stage.cmd from the cmdlines.txt and the T-12stage.cmd calls other files... part of my tweak are installed when the hive are set up in the begining and then I reinforce them here from the T-12stage.cmd..

I also do two sets of services to shut down... one here one later after the first reboot........

cmdow @ /HID
@echo off
Cls
TITLE Installing T-12 Stage Stuff

for %%i in (C 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:\WIN51 set CDROM=%%i:

SET KEY="HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
REM ************************************************************
REM Set CDROM Environment Path
REG ADD %KEY% /v "XPCDROM" /t REG_EXPAND_SZ /d %CDROM% /f
REM ************************************************************
REM Set Installation Environment Path from Hard Drive
set XPCDPATH=D:\XPCD\$OEM$\$1\Install
REG ADD %KEY% /v "XPCD" /t REG_EXPAND_SZ /d %XPCDPATH% /f
REG ADD %KEY% /v "XPCDHD" /t REG_EXPAND_SZ /d %XPCDPATH%HD /f
REM ************************************************************
REM Set Installation Environment Path from DVDCD if used unremark
REM set XPCDPATH=%CDROM%\Install
REM REG ADD %KEY% /v "XPCD" /t REG_EXPAND_SZ /d %XPCDPATH% /f
REM REG ADD %KEY% /v "XPCDHD" /t REG_EXPAND_SZ /d C:\InstallHD /f

REM Clean up file locations
set XPClean=%CDROM%\XPclean
REG ADD %KEY% /v "XPClean" /t REG_EXPAND_SZ /d %XPClean% /f

ECHO.
ECHO Install Hive/Register tweaks This makes the Windows Desktop, IE and explore(File Manager) how I like them ..

start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %CDROM%\I386\HIVEMY.INF
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %CDROM%\I386\HIVEadva.inf
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %CDROM%\I386\HIVEexpl.inf
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %CDROM%\I386\HIVEStre.inf
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %CDROM%\I386\HIVEsite.inf

ECHO.
ECHO Merging Regedit Favorites

start /wait REGEDIT /S %XPCDPATH%\MergeReg\RegeditFavorites.reg

ECHO.
ECHO Merging Restricted Sites and Blocked active-X

start /wait REGEDIT /S %XPCDPATH%\Securityfiles\blocklist.reg
start /wait REGEDIT /S %XPCDPATH%\Securityfiles\ie-ads.reg
start /wait REGEDIT /S %XPCDPATH%\Securityfiles\adult.reg

ECHO.
ECHO Change attrib of files copied from the DVD to not readonly

REM attrib -R "%programfiles%\~Sims2Loader\*.*" /S /D
REM attrib -R "%programfiles%\eMule\*.*" /S /D
REM attrib -R "%programfiles%\Lavasoft\*.*" /S /D
REM attrib -R "%programfiles%\PestPatrol\*.*" /S /D
REM attrib -R "%programfiles%\SimEnhancer\*.*" /S /D
REM attrib -R "%programfiles%\WinRAR\*.*" /S /D
REM attrib -R "%programfiles%\WinZip\*.*" /S /D
REM attrib -R "%programfiles%\dupfiles\*.*" /S /D
REM attrib -R "%programfiles%\Trillian\*.*" /S /D

ECHO.
ECHO Copyfolders from drive D:\ if not using DVD else remark out use above

start /wait .\T-12stage.vbs

ECHO.
ECHO Create "Default User" User Account Will be deleted later

net user "Default User" /add
net localgroup Administrators "Default User" /add
net accounts /maxpwage:unlimited

ECHO.
ECHO Auto-Login Settings

SET KEY="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
REG ADD %KEY% /V DefaultUserName /t REG_SZ /D "Default User" /f
REG ADD %KEY% /V DefaultPassword /t REG_SZ /D "" /f
REG ADD %KEY% /V AutoAdminLogon /t REG_SZ /D "1" /f

REM Disable ASPNET and Administrator User not going to use them anyway

SET KEY="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
REG ADD %KEY% /V ASPNET /t REG_DWORD /D 0X00000000 /f
REG ADD %KEY% /V Administrator /t REG_DWORD /D 0X00000000 /f

ECHO.
ECHO ShutDown Services Not Needed

Start /wait %XPCDPATH%\Services\SerToshu.cmd

REM After First login change to the Hidden "Default user" Then reboot

SET KEY="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
REG ADD %KEY%\999 /V 1 /D "REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V SID.cmd /D "%XPCDPATH%\SID\SID.cmd" /f" /f

EXIT

Edited by Coolsights2000
Link to comment
Share on other sites

  • 1 month later...

This is really bugging me now. How do I add user specific registry entries during setup? I've tried running a batch file from cmdlines.txt with both HKEY_CURRENT_USER and .DEFAULT entries but none of the settings take.

Thanks for any help.

Edited by royalbox
Link to comment
Share on other sites

Well I must say I am surprised. I thought this was going to be one of those easy questions, but it seems as though no-one knows the answer.

Isn't anybody adding custom registry tweaks to their unattended CDs to, say, change or remove their wallpaper for example? This seems very strange.

Link to comment
Share on other sites

Its really simple to do.

You have an $OEM$ folder inside that are two files: cmdlines.txt and a regtweaks.reg file.

cmdlines.txt calls the regtweaks.reg, and any HKEY_CURRENT_USER tweaks in this .reg file will apply to any and all users created after that.

cmdlines.txt

[COMMANDS]
"REGEDIT /S regtweaks.reg"
"RunOnceEx.cmd"

Edited by DigeratiPrime
Link to comment
Share on other sites

@DigeratiPrime

That's what I did so I must have done something else wrong as the settings didn't take. Thanks for confirming that this is the right way to do it, I'll try again.

EDIT:

Ah, I see what I've done. I used reg import instead of regedit /s. Don't ask me why. :unsure:

Thanks again.

Edited by royalbox
Link to comment
Share on other sites

I tried again with regedit /s and still none of the current user tweaks took. I tried creating a new account after installation as well and still no tweaks were applied. The local machine settings were applied.

Has anyone any idea what I'm doing wrong?

cmdlines.txt:

"tweaks.cmd"
"useraccounts.cmd"

tweaks.cmd:

for %%i in ("TWEAKS\*.reg") do (
   regedit /s "%%i"
)

Many thanks.

Edited by royalbox
Link to comment
Share on other sites

I'mnot an expert in batch programing but I think this will do what you want.

also I think TWEAKS should be the full path to your TWEAKS dir. or

you could use .\TWEAKS if its a sub of the current dir.

for /R TWEAKS %%i IN (*.reg) DO (
regedit /s %%i
)

Link to comment
Share on other sites

@jbm

I appreciate your help, but if it were the batch command that was wrong then none of the tweaks would have been applied. As it is, it's just the current user ones.

Thanks anyway.

I need to learn to read better. :P

Perhaps you should post one of the reg files thats not working.

Oh and I like your idea of having reg tweaks divided into diffrent files,

my reg tweak file is getting quite long.

Edited by jbm
Link to comment
Share on other sites

@jbm and @all

I'm really confused now. I just checked the install again and it seems that some of the current user tweaks 'are' working, while others are not.

Example. This didn't work:

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"MinAnimate"="0"

Nor this:

[HKEY_CURRENT_USER\Control Panel\Desktop]
"DragFullWindows"="0"

Whereas others like this did:

;---------------------------------------
; control panel -- display as a menu
;---------------------------------------
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_ShowControlPanel"=dword:00000002

Any ideas?

Edited by royalbox
Link to comment
Share on other sites

I could be completely wrong here but my guess is that windows defaults to

"let windows choose what's best for my computer" it changes it to what it

thinks is best.

This reg tweak sets it to custom

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects]
"VisualFXSetting"=dword:00000003

And it's been my experience that I've had to apply some tweaks more that

once to get them to work. That's probably because of things like the above.

Edited by jbm
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...