maxXPsoft

Ask your Seven xml ? here

616 posts in this topic

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

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.