Discussion:
Setting powercpl in an autounattend.xml file
(too old to reply)
l***@mac.com
2009-06-04 01:11:18 UTC
Permalink
I am trying to set the powercpl value for Vista to "High Performance"
in a hand-generated autounattend.xml file, but when I finish the
install and look at the results of "powercfg -LIST", it's always
"Balanced".

http://technet.microsoft.com/en-us/library/cc749019(WS.10).aspx says
"Valid Passes" are generalize and specialize, but I've tried both with
the same result.

Here is my xml file; is there something else I should be doing?

Thanks!

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://
schemas.microsoft.com/WMIConfig/2002/State">

<settings pass="windowsPE">

<component name="Microsoft-Windows-Setup"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS" processorArchitecture="amd64">
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key/>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>

<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition>
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
</Disk>
</DiskConfiguration>

<ComplianceCheck>
<DisplayReport>OnError</DisplayReport>
</ComplianceCheck>

<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
</component>

<component name="Microsoft-Windows-International-Core-WinPE"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS" processorArchitecture="amd64">
<UILanguage>en-us</UILanguage>
</component>

</settings>

<settings pass="oobeSystem">

<component name="Microsoft-Windows-Shell-Setup"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS" processorArchitecture="amd64">
<AutoLogon>
<Password>
<Value/>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>L</Username>
</AutoLogon>

<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value/>
<PlainText>true</PlainText>
</Password>
<Group>administrators;users</Group>
<Name>L</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>

<OOBE>
<HideEULAPage>true</HideEULAPage>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
<NetworkLocation>Other</NetworkLocation>
</OOBE>

<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c copy a:\upgrader.exe %TEMP%\upgrader.exe</
CommandLine>
<Order>1</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c copy a:\unattend.cmd %TEMP%\unattend.cmd</
CommandLine>
<Order>2</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%TEMP%\unattend.cmd</CommandLine>
<Order>3</Order>
</SynchronousCommand>
</FirstLogonCommands>

<TimeZone>Pacific Standard Time</TimeZone>
</component>

</settings>

<settings pass="specialize">

<component name="Microsoft-Windows-powercpl"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS" processorArchitecture="x86">
<PreferredPlan>381b4222-f694-41f0-9685-ff5bb260df2e</
PreferredPlan>
</component>

<component name="Microsoft-Windows-Deployment"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS" processorArchitecture="amd64">

<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT
\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t
REG_DWORD /d 00000000 /f</Path>
</RunSynchronousCommand>
</RunSynchronous>

</component>

</settings>

</unattend>
Zaphod Beeblebrox
2009-06-04 11:41:13 UTC
Permalink
Post by l***@mac.com
I am trying to set the powercpl value for Vista to "High Performance"
in a hand-generated autounattend.xml file, but when I finish the
install and look at the results of "powercfg -LIST", it's always
"Balanced".
http://technet.microsoft.com/en-us/library/cc749019(WS.10).aspx says
"Valid Passes" are generalize and specialize, but I've tried both with
the same result.
Here is my xml file; is there something else I should be doing?
Thanks!
<snip>
Post by l***@mac.com
<component name="Microsoft-Windows-powercpl"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS" processorArchitecture="x86">
<PreferredPlan>381b4222-f694-41f0-9685-ff5bb260df2e</
PreferredPlan>
</component>
<snip>

According to powercfg /list, that GUID is for the Balanced power
scheme. Try 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c, which should be the
GUID for the High Performance scheme. I'm not sure which pass you
should place it in though, sorry.

Hope this helps.
--
Zaphod

Vell, Zaphod's just zis guy, ya know? - Gag Halfrunt
lrucker
2009-06-16 21:54:17 UTC
Permalink
Weird. I know I had the right key in there once because I have a code
diff pasted in the bug with the right one.
lrucker
2009-06-18 19:26:34 UTC
Permalink
OK, definitely put the right GUID in this time, and still no luck.
Zaphod Beeblebrox
2009-06-18 20:14:42 UTC
Permalink
Post by lrucker
OK, definitely put the right GUID in this time, and still no luck.
Did you try both passes you mentioned in your original post? My best
guess is that the Specialize pass is the place for this seting to work
the way you want it, but that's only a guess.
--
Zaphod

Arthur: All my life I've had this strange feeling that there's
something big and sinister going on in the world.
Slartibartfast: No, that's perfectly normal paranoia. Everyone in the
universe gets that.
lrucker
2009-06-25 22:22:40 UTC
Permalink
On Jun 18, 1:14 pm, "Zaphod Beeblebrox"
Did you try both passes you mentioned in your original post?  My best
guess is that the Specialize pass is the place for this seting to work
the way you want it, but that's only a guess.
Yes, neither of them worked. Thanks, though!
Zaphod Beeblebrox
2009-06-26 12:00:33 UTC
Permalink
On Jun 18, 1:14 pm, "Zaphod Beeblebrox"
Did you try both passes you mentioned in your original post? My
best
guess is that the Specialize pass is the place for this seting to work
the way you want it, but that's only a guess.
Yes, neither of them worked. Thanks, though!
Ah, well then, how about using a RunSynchronousCommand in the
Microsoft-Windows-Deployment component of the Specialize pass?
Something like:

<settings pass="specialize">
<component name="Microsoft-Windows-Deployment"
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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Path>powercfg -setactive
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</Path>
<Order>1</Order>
<Description>Set Power Plan to High
Performance</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>

Hope this helps!
--
Zaphod

Voted "Worst Dressed Sentient Being in the Known Universe" for seven
years in a row.
Zaphod Beeblebrox
2009-07-02 13:21:48 UTC
Permalink
Post by Zaphod Beeblebrox
On Jun 18, 1:14 pm, "Zaphod Beeblebrox"
Did you try both passes you mentioned in your original post? My
best
guess is that the Specialize pass is the place for this seting to work
the way you want it, but that's only a guess.
Yes, neither of them worked. Thanks, though!
Ah, well then, how about using a RunSynchronousCommand in the
Microsoft-Windows-Deployment component of the Specialize pass?
<settings pass="specialize">
<component name="Microsoft-Windows-Deployment"
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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Path>powercfg -setactive
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</Path>
<Order>1</Order>
<Description>Set Power Plan to High
Performance</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
Hope this helps!
Did you make any progress with this?
--
Zaphod

No matter where you go, there you are!
Zaphod Beeblebrox
2009-06-18 20:14:42 UTC
Permalink
Post by lrucker
OK, definitely put the right GUID in this time, and still no luck.
Did you try both passes you mentioned in your original post? My best
guess is that the Specialize pass is the place for this seting to work
the way you want it, but that's only a guess.
--
Zaphod

Arthur: All my life I've had this strange feeling that there's
something big and sinister going on in the world.
Slartibartfast: No, that's perfectly normal paranoia. Everyone in the
universe gets that.
Loading...