MSFN Forum: Debut unattended W7 setup woes - MSFN Forum

Jump to content


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Debut unattended W7 setup woes

#1 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 12 September 2010 - 12:29 PM

Hi,

these are my first steps towards a (mostly) unattended installation of a Windows 7 Professional x64 system. It's for a new notebook for my mother.

Last time I did something similar is several years ago, and much has changed since.
I already customized a working Autounattend.xml with the latest Windows System Image Manager that mostly works as expected, but has two flaws left:

There are two screens showing up I cannot suppress, the first at the very beginning and a second at the end of the installation process (see attached screenshots).

Except for the partitioning screen (I'd like to configure this myself) I want to skip every dialog window that occurs.
(Yes, the file ei.cnf is missing, but isn't there some setting to compensate this?)

Autounattend.xml
Spoiler

Next point is a major difficulty:
Back in XP times, I used to have one file Prepare.cmd, which was executed at T-12 (called by cmdlines.txt) and imported a registry file to the default user profile.
In this way I was able to touch the default user profile before the setup process terminates and thus, less settings had to be adjusted for new user accounts.

I tried to achieve this with a SetupComplete.cmd placed in $OEM$\$$\Setup\Scripts looking like this:

Quote

@echo off &setlocal EnableExtensions
reg load HKU\TmpHive %SystemDrive%\Users\Default\NTUSER.DAT
regedit /s HKCU.reg
reg unload HKU\TmpHive

regedit /s HKLM.reg
:: Further test if registry changes do work at all: they do!
Reg add HKLM\SOFTWARE\BrowserChoice /f /v Enable /t REG_DWORD /d 0
:: other stuff going here

I've got no clue why the reg load action won't have any effect anymore.
(Edit: I replaced the regedit /s... lines with reg import ..., however the problem stays the same.)

How could I import the registry files HKCU.reg and HKLM.reg (both are in $OEM$\$$\Setup\Scripts)?
Is there another possibility to earlier execute a script while the setup process? Any suggestions?

Thanks in advance!

Mikka

Attached File(s)


This post has been edited by Mikka: 12 September 2010 - 02:20 PM



#2 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 12 September 2010 - 02:41 PM

Hello!
We can read inside "Unattended Windows Setup Reference for Windows 7.chm"

Quote

SkipMachineOOBE
SkipMachineOOBE specifies whether to skip Windows® Welcome.

Important:
This setting is deprecated.

SkipMachineOOBE should be used only in a test environment, and you should never ship a computer with the SkipMachineOOBE setting configured to true.

If you use this setting, Windows Welcome will be skipped, and any settings that a user selects during Windows Welcome will not be configured. For example, user-account creation, language, and time-zone settings will not be configured. Some Windows features may not function, as they depend on Windows Welcome values such as ProtectYourPC, which does not include a default value.

SkipUserOOBE
SkipUserOOBE specifies whether to skip the Welcome Center pop-up window in Windows Vista®.

Note:
This setting is deprecated. In Windows® 7, it has been replaced by the Getting Started application, which is available in the Start menu.


You can delete these files inside your "Autounattend.xml"!

Quote

<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>


And you can set your Windows 7 Professional version inside "Autounattend.xml"
You can check with WSIM (Windows System Image Manager).
Example for Windows 7 x86 (choose amd64 for your use!).

<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
             <ImageInstall>
                <OSImage>
                    <InstallFrom>
                        <MetaData wcm:action="add">
                            <Key>/IMAGE/NAME</Key>
                            <Value>Windows 7 PROFESSIONAL</Value>
                        </MetaData>
                    </InstallFrom>
                </OSImage>
            </ImageInstall>


Regards

This post has been edited by myselfidem: 12 September 2010 - 03:58 PM


#3 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 12 September 2010 - 05:36 PM

Good morning myselfidem,

thank you for your reply! It's true that both the SkipMachineOOBE and the SkipUserOOBE attribute is deprecated, WSIM also says it.
But omitting those lines will result in two additional windows forcing me to create a user - in exchange for the last network setting dialogue which this time won't appear.
However, I'll end up with the built-in Administrator and an unwanted new user account: In other words, it's no unattended installation either ...

You were perfectly right about the missing <ImageInstall> section, which skipped the first window.
But obviously, without these deprecated entries, the setup won't proceed automatically.

Regards,
Mikka

Attached File(s)


This post has been edited by Mikka: 12 September 2010 - 05:38 PM


#4 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 12 September 2010 - 11:47 PM

Mikka, could you please give as attachment your "Autounattend.xml"?
You can also find some help here: Ask your Seven xml? here...
Thanks

This post has been edited by myselfidem: 12 September 2010 - 11:49 PM


#5 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 13 September 2010 - 03:07 AM

I guess it depends on the line
<SkipMachineOOBE>true</SkipMachineOOBE>
whether the setup nags for a new user account or not. I'd like to avoid this behaviour.

Only the built-in Administrator user is wanted; I'll customize it and two regular user accounts manually later on.

Regards,
Mikka

Attached File(s)



#6 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 13 September 2010 - 03:46 AM

Hello!
You need to add a password for Administrator Account!

<AutoLogon>
    <Enabled>true</Enabled>
    <LogonCount>9999999</LogonCount>
    <Username>Administrator</Username>
    <Password>
        <Value>xxxxxxx</Value>
        <PlainText>true</PlainText>
    </Password>
</AutoLogon>



Check the order of the "settings pass" inside your "Autounattend.xml" with WSIM and validate it and save it!:

<settings pass="specialize"> before <settings pass="oobeSystem"> (at last)!
Missing:
<RegisteredOwner>Full name</RegisteredOwner>


Regards

This post has been edited by myselfidem: 13 September 2010 - 03:48 AM


#7 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 13 September 2010 - 05:29 AM

Bonjour !

According to your suggestions, I added a Password Value for the Administrator and a RegisteredOwner, adjusted the order (oobeSystem settings at the end of the file) and verified the result with WSIM (0 errors, 0 warnings).
What's the purpose of increasing the LogonCount to such a high number?

Unfortunately, things have worsened: Now, I can't even login as Administrator using the password value (12345) defined.
(That's why I set empty <Value> tags before.)

Besides, the setup keeps querying for an additional user account, thus nothing gained. Any further ideas?

Greetings to G’nèève,
Mikka

P.S.
(1) Oh yes, just for the record my updated xml file.
(2) Any idea for the SetupComplete.cmd issue?

Attached File(s)


This post has been edited by Mikka: 13 September 2010 - 05:37 AM


#8 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 13 September 2010 - 06:27 AM

Thanks for Grettings! :rolleyes:
You can try this, to skip the user Account creation:
<OOBE>
    <HideEULAPage>true</HideEULAPage>
    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
    <SkipUserOOBE>true</SkipUserOOBE>
    <NetworkLocation>Work</NetworkLocation>
    <ProtectYourPC>3</ProtectYourPC>
</OOBE>


OK, don't add a password (but works for me!)!
<AutoLogon>
      <Enabled>true</Enabled>
      <LogonCount>3</LogonCount> 
      <Password>
           <PlainText>true</PlainText>
           <Value></Value>
      </Password>
     <Username>Administrator</Username>
</AutoLogon>


Regards

This post has been edited by myselfidem: 13 September 2010 - 06:29 AM


#9 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 13 September 2010 - 08:07 AM

Hello Mikka!
I use these settings inside mine "Autounattend.xml" :
It's needed to use the same password!
<AutoLogon>
     <Enabled>true</Enabled>
     <LogonCount>9999999</LogonCount>
     <Username>myselfidem</Username>
     <Password>
         <Value>xxxxxx</Value>
         <PlainText>true</PlainText>
     </Password>
</AutoLogon>



<UserAccounts>
     <LocalAccounts>
           <LocalAccount wcm:action="add">
                 <Password>
                     <PlainText>true</PlainText>
                     <Value>xxxxxx</Value>
                 </Password>
                 <Group>Administrators</Group>
                 <DisplayName></DisplayName>
                 <Name>myselfidem</Name>
          </LocalAccount>
     </LocalAccounts>
</UserAccounts>


Fully unattended!
And I've only my Account as Administrator (myselfidem).

About "SetupComplete.cmd", you can add your reg files inside the folder "SCRIPTS" and write inside "SetupComplete.cmd":
Example, to adapt to your needs!

@echo off

ECHO TITLE Windows 7 PROFESSIONAL 64-bits - RunOnceEx Method for silent install

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\005 /VE /D "Registry Tweaks" /f
REG ADD %KEY%\005 /V 1 /D "REGEDIT /S %systemroot%\Setup\Scripts\Tweaks.reg" /f

REG ADD %KEY%\010 /VE /D "Cleanup Final Install" /f
REG ADD %KEY%\010 /V 1 /D "%systemroot%\Setup\Scripts\clean.vbs" /f

EXIT


Regards

This post has been edited by myselfidem: 13 September 2010 - 08:18 AM


#10 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 13 September 2010 - 09:13 AM

Salut myselfidem,

I really appreciate your help, thanks a lot for it!

View Postmyselfidem, on 13 September 2010 - 08:07 AM, said:

I use these settings inside mine "Autounattend.xml" :
It's needed to use the same password!
<AutoLogon>
     <Enabled>true</Enabled>
     <LogonCount>9999999</LogonCount>
     <Username>myselfidem</Username>
     <Password>
         <Value>xxxxxx</Value>
         <PlainText>true</PlainText>
     </Password>
</AutoLogon>


<UserAccounts>
     <LocalAccounts>
           <LocalAccount wcm:action="add">
                 <Password>
                     <PlainText>true</PlainText>
                     <Value>xxxxxx</Value>
                 </Password>
                 <Group>Administrators</Group>
                 <DisplayName></DisplayName>
                 <Name>myselfidem</Name>
          </LocalAccount>
     </LocalAccounts>
</UserAccounts>


Fully unattended!
And I've only my Account as Administrator (myselfidem).


Ah, I see, have to give it a try later, thanks!

Concerning the SetupComplete issue:
You're right about refering to the good old RunOnceEx entries but there's a downside to that:
The file HKCU.reg has been created to being imported into the default user profile.
The trick is to perform this customization before loading any user account (even not the built-in Administrator), so new user accounts will basically "inherit" the modified settings. This cuts user account customization down to a minimum.

While it's of no importance when the file HKLM.reg will be imported it is for HKCU.reg:
Even if one could apply the registry settings sometime later somebody has to deal with it.
I can't expect an end user - like my mother - to do this ...

Now my concern is that SetupComplete.cmd is executed too late in order to apply the necessary reghive fixes.
But I believe that this is still feasible, even for the W7 setup. Michael Murgolo also wrote about it (method C).

Regards,
Mikka

Edit:
Found a solution workaround for second window of my initial post: here and there.
Don't know yet if it will work for me.

This post has been edited by Mikka: 13 September 2010 - 10:30 AM


#11 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 13 September 2010 - 10:24 AM

Mikka, You can find some help here:
Ask your Seven xml...

How to customize default user profiles in Windows 7

And more info inside: "Unattended Windows Setup Reference for Windows 7.chm"
Section: Components: Microsoft-Windows-Shell-Setup

Quote

CopyProfile

The CopyProfile setting enables you to customize a user profile and use it as the default user profile. Windows uses the default user profile as a template to assign a profile to each new user.

To customize the default user profile:
On the technician computer, create a new answer file (Example: Unattend.xml)

Set CopyProfile to true in the Unattend.xml file.

Copy the file to the reference computer.

On the reference computer, log on as a user whose profile you can customize (for example, the built-in administrator account).

Customize the desired user-profile settings.

Run sysprep /generalize /unattend:unattend.xml.

During the generalize configuration pass, the customized user profile settings are copied to the default user profile. All subsequent user accounts that are created will have the customizations that you have set. For details about the Sysprep command, see the Sysprep Technical Reference in the Windows® Automated Installation Kit (Windows AIK) User's Guide (Waik.chm) or Windows® OEM Preinstallation Kit (Windows OPK) User's Guide (Opk.chm).

Important:
The built-in administrator account profile is deleted and recreated when you perform a clean Windows installation, or run the Sysprep tool. The CopyProfile setting is processed before the built-in administrator account is deleted, so any customizations that you make should appear in new user account profiles, including the new built-in administrator account profile.

I hope that will help you!

This post has been edited by myselfidem: 13 September 2010 - 10:26 AM


#12 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 14 September 2010 - 02:18 AM

Hello!
About Network location for your choice:

Set inside:
<settings pass="oobeSystem">
<OOBE>
   <HideEULAPage>true</HideEULAPage>
   <NetworkLocation>Other</NetworkLocation>
   <ProtectYourPC>3</ProtectYourPC>
   <SkipUserOOBE>true</SkipUserOOBE>
</OOBE>



Values for NetworkLocation:
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>


<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>2</ProtectYourPC>


<NetworkLocation>Other</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>


Regards

This post has been edited by myselfidem: 14 September 2010 - 02:24 AM


#13 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 14 September 2010 - 06:34 AM

Salut myselfidem!

Thank you very much for the effort, I did quite some testing in the meantime but to little avail ...

First things got worse (e.g. I was forced to remove the offlineServicing section with the attribute EnableLUA), now it appears that I've managed to restore the initial version (except for the first unwanted window).

In short, the doubled administrator user information didn't help (will lead to the new user creation window, too), regardless of whether I set a password (12345) or not.
The network logon screen (which I wanted to avoid initially) however is due to an unattended setup bug by courtesy of Microsoft (of course!) and one blog entry published by some guy merely affects Audit mode, so I assume I'll have to live with it ‒ for better or for worse. :}

As this whole story is starting to make me sick (if I was in the Romandie, I'd dare to say mais ça fait chier royalement, bordel de merde !... just to get you an idea :D) I decided to leave it at that:
i.e. clicking away that network connection window manually ...

However, there's one issue left:

In the last attached xml version I had inserted a section poorly documented by Microsoft, which serves to remove Windows components/prevents them from being installed.
I now came up with something like:
<servicing>
    <package action="remove">
        <assemblyIdentity name="Microsoft-Windows-Foundation-Package" version="6.1.7600.16385" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="" />
        <selection name="InboxGames" state="false" />
        <selection name="MediaCenter" state="false" />
        <selection name="OpticalMediaDisc" state="false" />
        <selection name="TabletPCOC" state="false" />
        <selection name="Xps-Foundation-Xps-Viewer" state="false" />
    </package>
</servicing>

I'd like to remove components like Tablet PC, XPS stuff, Media Center, DVD Maker or all the games (but not only the shortcuts).
Do you happen to know if the syntax above is correct (true/false) as I've got some doubts ...

Merci d'avance,
Mikka

#14 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 14 September 2010 - 06:46 AM

Mikka!
Do you have made the changes inside your "Autounattend.xml", like I show you for NetworkLocation?
Because you've made an error: "Work" and value "3"!!
For your choice is "Other" and value "3"!

To remove components you can use DISM. First "mount" your Windows 7 Image (install.wim)!

Yes, it' seems that the "Autounattend.xml" (I don't see any information about this inside Unattend.chm) with theses value aren't correct for "Autounattend.xml"...Try to delete these lines "servicing"!
Regards

This post has been edited by myselfidem: 14 September 2010 - 11:08 PM


#15 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 14 September 2010 - 07:04 AM

View Postmyselfidem, on 14 September 2010 - 06:46 AM, said:

Because you've made an error: "work" and value "3"!!


You mean, Work and 3 won't go together? Funny, but why? These are two different settings.
And for a start I actually like Windows Update to be disabled, why does that depend on <NetworkLocation>Other</NetworkLocation>?

Also WSIM didn't nag (except for the deprecated attributes) while checking the answer file ...
That's odd.

Edit: Last Autounattend.xml attached.
(Group Administrators adapted for german localization: Administratoren. Hope that's not wrong.)

Attached File(s)


This post has been edited by Mikka: 14 September 2010 - 07:18 AM


#16 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 14 September 2010 - 07:14 AM

Yes, Work and 3 won't go together! Doesn't match!

The NetworkLocation for "Work" the value is "2"!
And NetworkLocation for "Other" (like you want) is "3"!
Of course if the value isn't correct, you get an error (or the window, for select the NetworkLocation)!

Yes, I've seen that WSIM don't display an error for that!!

This post has been edited by myselfidem: 14 September 2010 - 07:22 AM


#17 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 14 September 2010 - 07:30 AM

Mikka!

You can make these changes inside your "Autounattend.xml":
I think, at this time you don't need "RunAsynchronousCommand". Try without this:

Quote

<RunAsynchronous>
<RunAsynchronousCommand wcm:action="add">
<Description>Netzwerkadresse festlegen verhindern</Description>
<Order>1</Order>
<Path>wscript %windir%\Setup\Scripts\nw_location_workaround.vbs</Path>
</RunAsynchronousCommand>
</RunAsynchronous>


Before correct these values, to see if it's OK:

Quote

To adapt to your needs= "Work"="2" or "Other"="3".
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Other</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>

Quote

<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<PlainText>true</PlainText>
<Value>12345</Value>
</Password>
<Group>Administratoren</Group>
<Name>Your Name</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>


Quote

<UserData>
<AcceptEula>true</AcceptEula>
<FullName>Your Full name</FullName>


Regards

This post has been edited by myselfidem: 14 September 2010 - 08:51 AM


#18 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 14 September 2010 - 10:57 AM

View Postmyselfidem, on 14 September 2010 - 07:14 AM, said:

Yes, Work and 3 won't go together! Doesn't match!

The NetworkLocation for "Work" the value is "2"!
And NetworkLocation for "Other" (like you want) is "3"!
Of course if the value isn't correct, you get an error (or the window, for select the NetworkLocation)!

Yes, I've seen that WSIM don't display an error for that!!


That is because NetworkLocation and ProtectYourPC are not the same thing!
NetworkLocation: choose firewall setting (if you boot to audit mode, always select Other)
ProtectYourPC: choose your Automatic Updates setting

http://technet.micro...28WS.10%29.aspx

The levels do not specifically match up to the Automatic Updates you see from Windows, but does match up to the OOBE screen which only shows you 3 options.

1 = install updates
2 = download updates
3 = disable updates

#19 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,384
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 14 September 2010 - 11:16 AM

Thanks Tripedacus! :rolleyes:

Sorry Mikka for my error about the values inside <ProtectYourPC></ProtectYourPC>!

This post has been edited by myselfidem: 16 September 2010 - 05:01 AM


#20 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 14 September 2010 - 12:05 PM

Thank you, myselfidem and Tripredacus.

In my opinion this is a catch and should be treated by WSIM.
And if errors might arise by omitting information like, for instance, RegisteredOwner, this must be checked by WSIM, too.

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy