• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
maxXPsoft

Ask your Seven xml ? here

616 posts in this topic

hi i have done the index bit using

<ImageInstall>

<OSImage>

<InstallFrom>

<MetaData wcm:action="add">

<Key>/IMAGE/VALUE</Key>

<value>1</value> and so forth upto <value>4</value>

that bit is fine and dandy but the naming of the pcs , i will be sharing all pcs on a network so each of the 64 bit ones have to have their own individual name , could i possibly add like <key>IMAGE\VALUE</key> value variable to the specialize for naming each of the 64 bit pcs according to the image number they were run from

0

Share this post


Link to post
Share on other sites

If ComputerName is set to an asterisk (*) or is an empty string, a random computer name will be generated. This random name has at most eight characters from the RegisteredOwner and/or RegisteredOrganization strings plus random characters.

<ComputerName>*</ComputerName>

otherwise you would have to run a script during specialize to name it

Something like this

IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" SET CompName=*_amd64

ECHO "%CompName%"

WMIC ComputerSystem where Name="COMPUTER-NAME" call Rename Name="%CompName%"

Edited by maxXPsoft
0

Share this post


Link to post
Share on other sites

ok no problem , i guess there is no way to run a single autounattended.xml that will work with 3 different versions of windows ultimate x64 or x86 to make it totally unattended , will just have to go inside the hive registry for each image and manipulate most of it that way , thanx for your input anyway

0

Share this post


Link to post
Share on other sites

Hello,

Until now I used DVD’s for my unattended Win7.

Here bellow the CommandLine I used

                <SynchronousCommand wcm:action="add"> 
<Order>3</Order>
<Description>About 275 Portable Utilities</Description>
<CommandLine>cmd /C start /wait c:\Install\UtilsPortable.exe</CommandLine>
</SynchronousCommand>

I finished preparing an unattended Win7 and softwares (16 GB) USB key thanks to Rufus utility

What will be the CommandLine to install an external prog since that prog is located into the same Win7 USB key?

I'll appreciate yr help

0

Share this post


Link to post
Share on other sites

What will be the CommandLine to install an external prog since that prog is located into the same Win7 USB key?

I'll appreciate yr help

CDROM variable used same way Post 102

Course can change to whatever like %USBkey%

0

Share this post


Link to post
Share on other sites

TNX maxXPsoft ;)

I'll give a try

BTW, may you please let me knwo when the SetupComplete.cmd start, before or after SynchronousCommand (Autounattend.xml)?

Regards

Edited by coucou
0

Share this post


Link to post
Share on other sites

BTW, may you please let me knwo when the SetupComplete.cmd start, before or after SynchronousCommand (Autounattend.xml)?

SetupComplete.cmd:

Add a Custom Script to Windows Setup

The functionality of Setupcomplete.cmd differs from the RunSynchronous and RunAsynchronous commands in that Setupcomplete.cmd runs after Windows Setup completes while the RunSynchronous and RunAsynchronous commands run during Windows Setup.

SynchronousCommand:

<FirstLogonCommands> with <SynchronousCommand wcm:action="add">

The FirstLogonCommands setting specifies commands to run the first time a user logs on to the computer. These commands run only once.

When a user with administrative privileges logs in for the first time, these commands are run with elevated access privileges.

Regards

0

Share this post


Link to post
Share on other sites

SetupComplete.cmd is actually run automatically after Windows setup but you will notice it is run right before Logon.

I password protect my user install and even the Administrator account I set a pass.

That is how I know it run before logon cause the commands are seen executing. You won't see setupcomplete running though, only commands within it I see some pop up.

0

Share this post


Link to post
Share on other sites

@myselfidem @maxXPsoft

In theory Setupcomplete.cmd runs after Windows Setup completes while the RunSynchronous commands run during Windows Setup. The partice belie that result.

I did by 3 times a test of SetupComplete.cmd vs SynchronousCommand (Autounattend.xml), when WPI.cmd is launched from SynchronousCommand 4 (see here bellow) or from Setupcomplete.cmd.

                <SynchronousCommand wcm:action="add"> 
<Order>1</Order>
<Description>UberPack v2.0.2 x64 several utilities</Description>
<CommandLine>cmd /C start /wait c:\Install\Win7_UberPacK_HEN_v2.0.2_x64.exe</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<Description>Internet Explorer 9 French and Hebrew Languages adding</Description>
<CommandLine>cmd /C start /wait c:\Install\IE9_langs_Install.exe</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>3</Order>
<Description>About 275 Portable Utilities</Description>
<CommandLine>cmd /C start /wait c:\Install\UtilsPortable.exe</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>4</Order>
<Description>Windows Post Install Wizard</Description>
<CommandLine>cmd /C start /wait c:\Windows\Setup\scripts\WPI.cmd</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>.
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>UberPack v2.0.2 x64 several utilities</Description>
<CommandLine>cmd /C start /wait c:\Install\Win7_UberPacK_HEN_v2.0.2_x64.exe</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<Description>Internet Explorer 9 French and Hebrew Languages adding</Description>
<CommandLine>cmd /C start /wait c:\Install\IE9_langs_Install.exe</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>3</Order>
<Description>About 275 Portable Utilities</Description>
<CommandLine>cmd /C start /wait c:\Install\UtilsPortable.exe</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>4</Order>
<Description>Windows Post Install Wizard</Description>
<CommandLine>cmd /C start /wait c:\Windows\Setup\scripts\WPI.cmd</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>

When WPI.cmd is launched from SynchronousCommand 4, it started after the SynchronousCommand 1, 2 and 3.

When WPI.cmd is launched from Setupcomplete.cmd, it started at least before the SynchronousCommand 3, if not before 1,2 and 3.

Regards

0

Share this post


Link to post
Share on other sites

what pass SynchronousCommand?

Run a Custom Script after Windows Setup Completes You can make further customizations after Windows Setup completes by adding commands to the %WINDIR%\Setup\Scripts\SetupComplete.cmd file. This file enables you to install additional applications, run custom Windows scripts (cscript/wscript), or make other modifications to the system before a user logs on.

Note:

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

After Windows is installed but before the logon screen appears, Windows Setup searches for the SetupComplete.cmd file in the %WINDIR%\Setup\Scripts\ directory.

If a SetupComplete.cmd file is found, the file is executed. Otherwise, installation continues normally. Windows Setup logs the action in the Setupact.log file.

Note:

You cannot reboot the system and resume running SetupComplete.cmd.

Setup does not verify any exit codes or error levels in the script after executing SetupComplete.cmd.

The functionality of Setupcomplete.cmd differs from the RunSynchronous and RunAsynchronous commands in the following way: Setupcomplete.cmd runs after Windows Setup completes, while the RunSynchronous and RunAsynchronous commands run during Windows Setup.

Edited by maxXPsoft
0

Share this post


Link to post
Share on other sites

Anyone has any idea why am I getting this error popup? (see attachment)

I do the same for processorArchitecture="wow64" btw, just in case both versions of IE are being used.

I even tried with untouched default Win7 image, just adding the answer file. Boom. Something is clearly wrong but I have no idea what :(




<settings pass="specialize">
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DisableAccelerators>true</DisableAccelerators>
<DisableFirstRunWizard>true</DisableFirstRunWizard>
<DisableWelcomePage>true</DisableWelcomePage>
<DisableOOBAccelerators>true</DisableOOBAccelerators>
<EnableLinksBar>false</EnableLinksBar>
<FavoritesDelete>true</FavoritesDelete>
<Home_Page>http://www.google.com</Home_Page>
<SuggestedSitesEnabled>false</SuggestedSitesEnabled>
<ShowInformationBar>true</ShowInformationBar>
<SearchScopes>
<Scope wcm:action="add">
<DisplayQuickPick>false</DisplayQuickPick>
<ScopeKey>Search1</ScopeKey>
<ScopeDisplayName>Google</ScopeDisplayName>
<ScopeUrl>http://www.google.com/search?q={searchTerms}</ScopeUrl>
<ScopeDefault>true</ScopeDefault>
<FaviconURL>http://www.google.com/favicon.ico</FaviconURL>
<ShowSearchSuggestions>false</ShowSearchSuggestions>
</Scope>
</SearchScopes>
<DisableDevTools>true</DisableDevTools>
</component>
</settings>

post-204900-0-97558400-1343678262_thumb.

0

Share this post


Link to post
Share on other sites

Yes they say that happen on 64 bit IE

I run the 32 bit IE because most plugins and stuff work with it so guess that why my scopes did work.

0

Share this post


Link to post
Share on other sites

And I wasted couple hours trying to figure out wtf did I do wrong. Oh well.

The whole thing behaves weirdly anyway. You would expect that setting a search scope in the way I posted here would change things accordingly, but no.

It SEEMS that if you capture such installation where you actually run IE, but cancel the configuration wizard and only change couple different things, the scopes just cannot be set the way you want anyway. After installing with such image the default scope would still be Bing, and Google would be another in the list, which is totally not what I expected. This really baffles me because I need (wan) to set a couple things like opening tabs in the same window, removing few items from the menu bar etc. Grr!

Any ideas?

Edited by TheWalrus
0

Share this post


Link to post
Share on other sites

Can someone provide working code for automating the partion creating/disk selecting?

I tried numerous combinations but everything failed. It seems real simple when explained on technet.

I need this for my Virtual Machine xml where there is only one disk (no partitions). Or maybe i cant be done? meaning there should be atleast one partition on the drive. It cant create partition unattended?

Edited by Tomorrow
0

Share this post


Link to post
Share on other sites

You can try to add inside your Autounattend.xml file, these lines and adapt to your needs:


<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">
<UserData>
<Organization>TEST</Organization>
<FullName>test</FullName>
<AcceptEula>true</AcceptEula>
</UserData>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>100</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>system</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>Main</Label>
<Letter>C</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows 7 ULTIMATE</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
</component>
</settings>

Edited by myselfidem
0

Share this post


Link to post
Share on other sites
You can try to add inside your Autounattend.xml file, these lines and adapt to your needs
Worked like a charm. Much appreciated mate :thumbup

I will use this only for virtual machine as im not comfortable using it on real drives (bad suprise to see your data drive wiped out of existance lol).

Edited by Tomorrow
0

Share this post


Link to post
Share on other sites

...bad suprise to see your data drive wiped out of existance lol.

:)

Yes, the Disk will be wiped!

*Edit: Unfortunatly we can't keep others partitions, because the full Disk is wiped even if we use: <WillShowUI>Always</WillShowUI>with the example given above!

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

Why doesent the powercfg setting work?

http://technet.microsoft.com/en-us/library/cc749019(v=ws.10)

I pre set to high performance but after install it's still Balanced. I checked the GUID's on a fresh install via powercfg -list and these were correct. 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c was the high performance scheme and i have this in my .xml under Microsoft-Windows-Shell-Setup:

<component name="Microsoft-Windows-powercpl" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PreferredPlan>8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</PreferredPlan>
</component>

0

Share this post


Link to post
Share on other sites

Why doesent the powercfg setting work?

Never has worked not even in Vista

I just use a Powerplan.cmd I run at Firstlogoncommands

REM        Adding Powerplan
POWERCFG -SETACTIVE 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
REM ALL TO 120 minutes time and you can change.
POWERCFG -X -monitor-timeout-ac 120
POWERCFG -X -disk-timeout-ac 120
POWERCFG -X -standby-timeout-ac 120
REM or hibernate OFF
POWERCFG -H OFF

Edited by maxXPsoft
0

Share this post


Link to post
Share on other sites

Ah i see. Also can i request an UEFI version of the previously posted xml that creates the nessesary partitions?

Not that im expecting to run UEFI based image in VirtualBox any time soon (atleast not windows), but it would be nice to have the code handy. UEFI setup creates one extra partition so the partition order looks like this:

Part1: 128MB (MSR)

Part2: 100MB (System)

Part3: (Windows)

GPT Conf

Edited by Tomorrow
0

Share this post


Link to post
Share on other sites

Your link already shows how to do it or unattend.chm covers this

I have a OEM UEFI capable personal home PC. I have formatted it and reinstalled normally

1. OEM junkware had C drive over 26gb

2. 2 TB C: drive is like the most ridiculous thing to me.

When I tried EFI have had problems with it like not able to boot to F8 'Repair your Computer' even with a created EFI boot disk. Added a SSD and I get about BootTime 17945 ms so have wondered if there would be any advantage to switching it over.

I may try again today unless something comes up. If it works then I'll have a xml from an actual

EDIT: This was the problem I encountered last EFI I tried

This version of System Recovery Options is not compatible with the version of Windows you are trying to repair.

I searched high and low for a week and finally came across an answer that said something about extra Drives would cause error's

All I done was disable USB Floppy and USB Hard Drive in UEFI options in bios.

Recovery DVD would then work

Edited by maxXPsoft
0

Share this post


Link to post
Share on other sites

Create UEFI partitions. Save as AutoUnattend.xml attached to First post

Created xml same way as your link Sample: Configure UEFI/GPT-Based Hard Drive Partitions by Using Windows Setup

as usual MS screws things up.

Right off I could see where they were <InstallTo> Partition 3 was wrong. Can't install to a <Size>128</Size> mb disk

I booted with xml on usb and it parsed xml and crashed on <ModifyPartitions>

I could tell from Panther/setupact.log it was getting first 2 entries but not third.

It said <!-- MSR partition does not need to be modified --> so why are they adding it? hmm. I remarked out whole thing and changed 4th partition <Order>4</Order> to a 3

Bingo it ran and finished.

I wasn't happy cause I wanted a full GPT disk and hide the recovery partition so I booted with a txt file on usb and removed <DiskConfiguration> from my xml and named to .bak

I ran the Diskpart commands to create all the partitions

I hit Shift and F10 and CD to my USB and ran Notepad opening the file and paste them into the command prompt. Then renamed xml and rebooted. it completed with no errors

So now I have a GPT UEFI setup but right now it is slower than it was. SSD takes a few days to tweak itself.

These are the DISKPART commands.

DISKPART
SELECT DISK 0
CLEAN
CONVERT GPT

CREATE PARTITION PRIMARY SIZE=250
SET ID="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
FORMAT QUICK FS=NTFS LABEL="Recovery"
ASSIGN LETTER="R"

CREATE PARTITION EFI SIZE=100
FORMAT QUICK FS=FAT32 LABEL="System"
ASSIGN LETTER="S"

CREATE PARTITION MSR SIZE=128

CREATE PARTITION PRIMARY
FORMAT QUICK FS=NTFS LABEL="SE7EN"
ASSIGN LETTER="C"

EXIT

Edited by maxXPsoft
0

Share this post


Link to post
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.