Start to finish on a 5,1 Macbook Pro (9400M / 9600M GT)
I created an unattended install of Windows 7 Professional using RT-Seven Lite. I took a factory ISO, stripped out a bunch of stuff I didn't need, and added the latest nVidia drivers (extracted from the downloaded .exe).
I booted ubuntu from a flash drive, wiped my hard drive, formatted to GPT, then created a 200mb EFI partition, 300mb Windows System Reserved partition, and a ~480gb primary NTFS partition.
(It seems my autounattend DID NOT format over what I had there, but YMMV. Be ready to restore refit (or some other efi shell) to your EFI partition.)
I restored my customized efi folder to the EFI partition, containing refit, devil's files (currently not using), and some documentation.
The install completed perfectly, however I'm only able to get output from the integrated (9400M) card so far. This requires setting 2 PCI config bytes, and one I/O register in the EFI shell.
Code:
set 8 to > mm 0010003E -PCI
set 7 to > mm 03000004 -PCI
set 2 to > mm 0750 -IO
- Setting register 3E on bus 00 device 10 (PCI Bridge controlling the integrated graphics) to "8" enables VGA.
- Setting register 04 on bus 03 device 00 (the 9400M device) to "7" enables I/O access and sets Bus Master.
- Changing I/O 0x750 from "3" to "2" disables power to the 9600M card, extending battery life, reducing heat, and in my case, allowing graphical output.
I have to change each of those values on each reboot before navigating to fs0:\EFI\boot\ and running bootx64.efi No loading screen, 9400M output begins when windows loads the nvidia driver for desktop.
I've spent days trying various configurations, PCI config space, I/O values, NVRAM dumps/edits/loads, yet I cannot get the 9600M to work. The 9600 is on Bus 2, and checking the PCI configuration returns all F's. That tells me something else in the config is disabling it, I just can't find it.
I can get 00-0c (PCI-X bus for 9600) to enable VGA, set the gmux (pulled IO reg's from the ubuntu driver), but haven't figured out how to get GraphicsOutput or the other NVRAM values to migrate from device E7 to E5. That's where I've been banging my head...
tl;dr:
if you're happy with only using integrated graphics, this method works on the 5,1.
I don't have the bandwidth to share my install .iso, but I'll include my autounattend below.
Again, use rt7 to include nvidia drivers, and make sure you're able to use the EFI shell once windows has installed, or even the 9400m won't function.
PHP:
<?xml version="1.0" encoding="utf-8"?>
<!--This answer file generated by RT Seven Lite-->
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" 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">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<UserLocale>en-US</UserLocale>
<UILanguage>en-US</UILanguage>
<SystemLocale>en-US</SystemLocale>
</component>
<component name="Microsoft-Windows-Setup" 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">
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>EFI</Type>
<Size>100</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>MSR</Type>
<Size>128</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition>
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>System</Label>
<Format>FAT32</Format>
</ModifyPartition>
<ModifyPartition>
<Order>2</Order>
<PartitionID>3</PartitionID>
<Letter>C</Letter>
<Format>NTFS</Format>
<Label>Windows</Label>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<value>Windows 7 PROFESSIONAL</value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<Key>HYF8J-CVRMY-CM74G-RPHKF-PW487</Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
<Organization>efi</Organization>
<FullName>away</FullName>
<AcceptEula>true</AcceptEula>
</UserData>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" 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">
<UserAccounts>
<LocalAccounts />
<AdministratorPassword>
<Value>password</Value>
</AdministratorPassword>
</UserAccounts>
<AutoLogon>
<Password>
<Value>password</Value>
</Password>
<Enabled>true</Enabled>
<LogonCount>9999</LogonCount>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<NetworkLocation>Home</NetworkLocation>
<HideEULAPage>true</HideEULAPage>
<ProtectYourPC>3</ProtectYourPC>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<DisableAutoDaylightTimeSet>true</DisableAutoDaylightTimeSet>
<TimeZone>Central Standard Time</TimeZone>
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1440</HorizontalResolution>
<VerticalResolution>900</VerticalResolution>
<RefreshRate>60</RefreshRate>
</Display>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" 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">
<ComputerName>mbp</ComputerName>
</component>
<component name="Microsoft-Windows-Security-Licensing-SLC-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
</settings>
</unattend>
also, don't use ^^^this^^^ if you aren't able to read it. I'm not liable if you break your stuff with my code
