Jump to content

New to 7 unattended (and kinda perfectionist)


Recommended Posts

I would like to try to install everything before first logon, so all programs, settings and regtweaks will be installed for all users. But also because I like the challenge :) unfortunately $OEM$ folder is not copied to the hard drive at this stage. Otherwise I would definitely place the cmd file in the $1 folder.

It doesn't seem logical to call the install.cmd file first if the path is unknown? But I will try.

I was also thinking about combining both commands, something like this:

cmd /C 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:\Sources\Install.wim START /WAIT %i:\installApps.cmd

Going to try that with %i and %%i (two seperate RunSynchronous commands). It works when I run this command from Start > Run.

It worked! :thumbup

But I don't know wich of the two commands worked, with %i or with %%i :whistle: but thats easy to figure out.

Edited by ZileXa
Link to comment
Share on other sites


  • 2 weeks later...

I have had time to spend on this project again. This is the working command (in pass Specialize, inside component Microsoft-Windows-Deployment):


<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Set CDROM Variable</Description>
<Path>cmd /C 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:\Sources\Install.wim START /WAIT %i:\installApps.cmd</Path>
</RunSynchronousCommand>
</RunSynchronous>

Unfortunately 2 things:

I have figured out why the contents of $OEM$\$1 wasn't copied to the harddrive. I had to place $OEM$ inside the Sources folder instead of the root of my DVD.

I have now also added a FirstLogonCommands command to my autounattend in an attempt to apply the HKCU tweaks. but they will only be applied to the current logged in user. And if I create 2 other users later, the tweaks will not have been applied to them :( So thats still an issue.

Edited by ZileXa
Link to comment
Share on other sites

I have had time to spend on this project again. This is the working command (in pass Specialize, inside component Microsoft-Windows-Deployment):

Cannot install Applications during Specialize. You must use Audit Mode or OObesystem
During the specialize configuration pass of Microsoft® Windows® Setup, machine-specific information for the image is applied. For example, you can configure network settings, international settings, and domain information.

Reg tweaks applied during specialize can only be machine specific like HKLM

Commands in the Setupcomplete.cmd file are executed with local system privilege.

HKLM Reg tweaks can be ran here but not HKCU which are user specific.

HKCU can be done during Firstlogoncommands

Unattend.chm is your friend here and will explain a lot of this

Edited by maxXPsoft
Link to comment
Share on other sites

I have had time to spend on this project again. This is the working command (in pass Specialize, inside component Microsoft-Windows-Deployment):

Cannot install Applications during Specialize. You must use Audit Mode or OObesystem
During the specialize configuration pass of Microsoft® Windows® Setup, machine-specific information for the image is applied. For example, you can configure network settings, international settings, and domain information.

Reg tweaks applied during specialize can only be machine specific like HKLM

Commands in the Setupcomplete.cmd file are executed with local system privilege.

HKLM Reg tweaks can be ran here but not HKCU which are user specific.

HKCU can be done during Firstlogoncommands

Unattend.chm is your friend here and will explain a lot of this

Thanks I will do more reading. I have also done my first tests with Firstlogoncommands. But HKCU will then only apply for the user currently logged in. Not for users created in the future. So I should create something like RunOnce that will run for all future users.

Btw I am installing 20+ other apps just fine during Specialize.. perhaps they don't require a high permissions level. I prefer doing it "right" so I will do some more reading first!

edit:

Audit mode enables OEMs and corporations to install additional device drivers, applications, and other updates to a master Windows® image. Additionally, you can test the installation before shipping the computer to an end-user.
and
The auditSystem configuration pass processes unattended Windows Setup settings in system context in audit mode. The auditSystem configuration pass runs immediately before the auditUser Configuration Pass configuration pass, which is used to apply settings in user context.
and
Typically, the auditUser configuration pass is used to execute RunSynchronous or RunAsynchronous commands. These commands are used to run scripts, applications, or other executables during audit mode.

So both auditSystem and auditUser in the can be used to install both apps and registrytweaks, since OEMs will use it even to install drivers. But the last quote shows it is recommended to do this during auditUser pass.

woops. no I was wrong, auditSystem is the correct one:

In auditSystem, the built-in administrator account is enabled by the system, and after logging into the system, the built-in administrator account is disabled during auditUser. This enables you to use audit mode with administrator privileges, but the next time the computer shuts down, the built-in administrator account will continue to be disabled. For more information, see Enable and Disable the Built-in Administrator Account.
Edited by ZileXa
Link to comment
Share on other sites

If you do Audit you will need both because Auditsystem load's Audituser pass

Thats a good way of doing everything. When it reboots into oobe all is done

Edit: Only problem is some apps install only for current user

I do office 2007 with an xml and allupdates in the Updates folder

REG ADD %KEY%\iAdd /V Inum /D "CMD /C Start /Wait %SystemDrive%\APPS\MS_Office_Enterprise_2007\setup.exe /config custom-uA.XML" /f

Edited by maxXPsoft
Link to comment
Share on other sites

Ok I have read some more and have to come to the conclusion both AuditSystem and AuditUser is not the way I want to do it.

AuditSystem and Audituser do not start automatically during setup, you have to use a unattended setup setting (reseal). Wich is fine, but the goal of AuditSystem and AuditUser is to create a preconfigured Windows Setup.

This means, if I want to update my ISO with a new version of Ccleaner, Firefox, Office, Antivirus oetc I cannot simply copy the newer .exe setup files to my ISO, I will have to run Windows Setup in Audit Mode again to do this. Also if I have a few extra regtweaks I would have to go all over Windows Setup again.

This is exactly what I do not want to do!

So I decided to keep things the way they are:

1. install apps during Specialize

2. the apps that cannot be installed will be installed via RunOnce or similar (Office2010 and Paint.net).

3a. regtweaks.reg will be applied during Specialize but most wont work (HKCU). therefore regtweaks.reg will also be applied during RunOnce (run every time a new user logs in).

OR

3b. I just found this trick, wich should work also from Specialize or just via SetupComplete.cmd:

:: Load the default profile hive
REG LOAD HKU\Hive C:\Users\Default\NTUSER.DAT

:: Configure the default user profile
start /wait regedit.exe /s Regtweaks.reg

:: Unload the default profile hive
REG UNLOAD HKU\Hive

This way, if I want to:

update the apps in my ISO, all I have to do is overwrite firefoxsetup.exe for the new one.

add/replace regtweaks, all I have to do is edit the existing regtweaks.reg.

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