Jump to content

Unattend And Registry Tweaks


Recommended Posts

Well, I've tried it all. I've tried to use cmdlines.txt and GUIRunOnce. The registry entries I want applied to the system during or directly after the install will not apply correctly. either some keys will and others won't. The funny thing is, it is different with each attempt!?

GUIRunOnce - I thought GUIRunOnce was a porblem because the Explorer Shell wasn't initialized. So I put a delay so the Shell would load. It worked once or twice, but it is not consistant.

I even removed the silent switch to regedit so it would prompt me when the reg file was to be imported. After clicking OK, it came back with the "everything is successfuly' messagebox. But it no worky.

CmdLines.Txt - Same problem.

Has anyone else experienced this!

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center]
"AntiVirusDisableNotify"=dword:00000001
"AntiVirusOverride"=dword:00000001

;Disable Firewall Notifications
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center]
"FirewallDisableNotify"=dword:00000001

;Disable Automatic Updates Notifications
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center]
"UpdatesDisableNotify"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting]
"DoReport"=dword:00000000

;Disables Windows Tour bubble popup
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Applets\Tour]
"RunCount"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList]
"Administrator"=dword:0000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWelcomeScreen"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AllowMultipleTSSessions"=dword:00000000
"LogonType"=dword:00000000
"UIHost"=hex(2):6c,00,6f,00,67,00,6f,00,6e,00,75,00,69,00,2e,00,65,00,78,00,65,\
 00,00,00

[HKEY_CURRENT_USER\Control Panel\Desktop\]
"SCRNSAVE.EXE"=-
"ScreenSaveActive"="0"

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"SCRNSAVE.EXE"=-
"ScreenSaveActive"="0"

[HKEY_CURRENT_USER\Control Panel\PowerCfg]
"CurrentPowerPolicy"="2"

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg]
"CurrentPowerPolicy"="2"

Link to comment
Share on other sites


GUIRunOnce - I thought GUIRunOnce was a porblem because the Explorer Shell wasn't initialized. So I put a delay so the Shell would load. It worked once or twice, but it is not consistant.

What did you type for the GUIRunOnce?

Link to comment
Share on other sites

You need to quote them in [GuiRunOnce]

[GuiRunOnce]
%SystemDrive%\Drivers\install.cmd

Change to

[GuiRunOnce]
"%SystemDrive%\Drivers\install.cmd"

one more..

Regedit -s %SystemDrive%\Drivers\RegKeys.reg

change to

Regedit /s %SystemDrive%\Drivers\RegKeys.reg

Link to comment
Share on other sites

You need to quote them in [GuiRunOnce]

[GuiRunOnce]
%SystemDrive%\Drivers\install.cmd

Change to

[GuiRunOnce]
"%SystemDrive%\Drivers\install.cmd"

one more..

Regedit -s %SystemDrive%\Drivers\RegKeys.reg

change to

Regedit /s %SystemDrive%\Drivers\RegKeys.reg

argon007, I appreciate the help. I'll have to test this later. I'm not sure why this would change my out come as everything is executing (step by step validation) as expected. But, you never know. This could be why it so intermittent.

Link to comment
Share on other sites

[GuiRunOnce]
%SystemDrive%\Drivers\install.cmd

Install.bat

Regedit -s %SystemDrive%\Drivers\RegKeys.reg

Just checking but the install.cmd isn't really called install.bat as stated above, is it?
Link to comment
Share on other sites

Pretty Easy.

Create cmdlines.txt in $OEM$ folder if you do not already have one.

And make it say:

[COMMANDS]
"REGEDIT /S install.reg"

So place your install.reg file in the $OEM$ folder too.

Now in your winnt.sif file make sure it has at least:

[Unattended]
   UnattendMode = "FullUnattended"
   OemSkipEula = "Yes"
   OemPreinstall = "Yes"

[GuiRunOnce]
   %systemdrive%\install\Installer.cmd

Ok now in your $OEM$ folder make a $1 and in make a install folder. Of course only if you dont have already.

Now in the install folder. Place your install.reg and your install.cmd here too.

Now make a installer.cmd file and place it in the install folder too.

Here is what goes into installer.cmd:

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Finish Installing Applications" /f

REG ADD %KEY%\055 /VE /D "Installing And Rebooting" /f
REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\install.cmd" /f

shutdown -r -t 60 -c "Rebooting To Complete Updates!"

EXIT

Now make sure you load your install.reg file from install.cmd now too. Like this:

REGEDIT /S %systemdrive%\install\install.reg

You can change the -t 60 to however many secs. u want to wait before it restarts. 60 should be fine. You want to make sure explorer complely loads before it restarts. So 60 should do that.

Done simply as that.

Now what happens is your .reg file will be installed twice. Once right after installing windows and again on the next reboot. :) So you have to install a lot of tweaks after you have rebooted at least once after installing windows. I do it twice just to make sure.

Now install.cmd will only run once like normal after the first restart.

But really you can just do them all via runonce after rebooting one time using shutdown.exe or whatever u want.

If you have any problems or whatever just attache your complete install.reg, install.cmd, winnt.sif, and installer.cmd and I will fix it all up and then you can just cut and paste.

Link to comment
Share on other sites

Thanks war59312.

I'll try your advice.

Just an FYI. I installed over RIS on 4 of the exact same systems today, using the same everything. 2 out of the 4 systems had the reg entries applied correctly. The other ones required me to import the regs again. It's a pain.

I apprecaite the replys.

Link to comment
Share on other sites

Hiya,

I may be showing my ignorance, but...in my experience, using the "HKEY_USERS\" key has been problematic. Perhaps try replacing that entry with an HKCU or HKLM?

Reg entries added for HKCU at CMDLINES are applied to the "default" or "system" user and so will apply to all users after first login anyway, right?

Good Luck!

Link to comment
Share on other sites

Suppose to I believe. But I know a lot of mine to dont and must be replied after first reboot since they get reset after you reboot the first time. Thats why I use my method above with runonce. I use it to simpy reply the registy tweaks again after that first reboot.

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