Code Monkey home page Code Monkey logo

brigadier's Introduction

Brigadier

A Windows- and OS X-compatible Python script that fetches, from Apple's or your software update server, the Boot Camp ESD ("Electronic Software Distribution") for a specific model of Mac. It unpacks the multiple layers of archives within the flat package and if the script is run on Windows with the --install option, it also runs the 64-bit MSI installer.

On Windows, the archives are unpacked using 7-Zip, and the 7-Zip MSI is downloaded and installed, and removed later if Brigadier installed it. This tool used to use dmg2img to perform the extraction of files from Apple's WindowsSupport.dmg file, but more recent versions of 7-Zip have included more completely support for DMGs, so dmg2img seems to be no longer needed.

This was written for two reasons:

  1. We'd like to maintain as few Windows system images as possible, but there are typically 3-5 BootCampESD packages available from Apple at any given time, targeting specific sets of models. It's possible to use the Orca tool to edit the MSI's properties and disable the model check, but there are rarely cases where a single installer contains all drivers. Apple can already download the correct installer for a booted machine model in OS X using the Boot Camp Assistant, so there's no reason we can't do the same within Windows.
  2. Sometimes we just want to download and extract a copy of the installer for a given model. The steps to do this manually are tedious, and there are many of them. As of the spring of 2013, Apple has made a number of Boot Camp installer packages available on their support downloads page, but they are still a split across many different different sets of models and it is still inconvenient to ensure you have the correct package.

It was originally designed to be run as post-imaging step for Boot Camp deployments to Macs, but as it requires network connectivity, a network driver must be already available on the system. (See Caveats below)

Important (!) note on support for Brigadier

Brigadier has produced less-than-great results with some combinations of driver packages and hardware models in recent versions of Boot Camp 5, and now with Boot Camp 6. Some people have confirmed issues with Boot Camp 6 and Windows 7 in general, so these may not be entirely Brigadier's fault. Some examination of the Boot Camp setup.exe indicates to me that this executable performs several tasks and sets up some environment for the eventual execution of BootCamp.msi, which we're not always able to get with Brigadier's simple invocation of msiexec to install the MSI directly.

I'm far from knowledgable enough about Windows internals to understand how to be able to perform a fully-automated version of whatever setup.exe actually does (besides eventually run msiexec /i /qr on the MSI). For example, this PR suggests that better results can be achieved by using different "quiet" options to msiexec, but a disassembly of setup.exe shows that it is actually executing /qr, as does the code in the current master branch. This kind of question is one I don't feel I have enough knowledge to attempt an answer.

There have been strange issues I've experienced a couple of years ago as well. For example, a single driver installer (Intel chipset-related) that pops up a series of WinRAR SFX errors due to it attempting to sequentially execute all of the driver's localization files (which aren't even executable). Simply clicking through these dialogs eventually causes the installation to continue, but until that happens the process is blocked. This error doesn't happen when a user manually runs setup.exe, but why I do not understand.

While I maintain some hope to be able to resolve these issues, my environment's use case for dual-boot labs is shrinking and so it's difficult to justify the time required to spend further researching these issues. If anyone who is knowledgeable about reversing setup.exe-like installer wrappers and MSI installers, and Windows systems administration in general, is interested in tackling the currently-somewhat-broken support for silent installs of Boot Camp drivers in this tool, I'd love some help! There are several installer properties in BootCamp.msi that may be of some help with this issue as well.

Usage

Run brigadier with no options to download and unpack the ESD that applies to this model, to the current working directory. On OS X, the ESD is kept in a .dmg format for easy burning to a disc; on Windows, the driver files are extracted.

Run it with the --model option to specify an alternate model, in the form MacPro3,1, etc.

Run it with the --install option to both download and install, deleting the drivers after installation. This obviously works only on Windows. This option was made for doing automated installations of the Boot Camp drivers.

Place a brigadier.plist file in the same folder as the script to override the .sucatalog URL to point to an internal Software Update Server catalog (details below).

Additional options shown below.

Getting it

You can find a pre-compiled binary for Windows in the releases area. This can be useful if you don't already have Python installed on Windows. This was built using PyInstaller. More details on building it yourself below.

It can also be run directly from a Git checkout on either OS X or Windows.

Configuration

Besides a few command-line options:

Usage: brigadier [options]

Options:
  -h, --help            show this help message and exit
  -m MODEL, --model=MODEL
                        System model identifier to use (otherwise this
                        machine's model is used).
  -i, --install         After the installer is downloaded, perform the install
                        automatically. Can be used on Windows only.
  -o OUTPUT_DIR, --output-dir=OUTPUT_DIR
                        Base path where the installer files will be extracted
                        into a folder named after the product, ie.
                        'BootCamp-041-1234'. Uses the current directory if
                        this option is omitted.
  -k, --keep-files      Keep the files that were downloaded/extracted. Useful
                        only with the '--install' option on Windows.

You can also create a brigadier.plist XML plist file and place it in the same directory as the script. It currently supports one key: CatalogURL, a string that points to an internal SUS catalog URL that contains BootCampESD packages. See the example in this repo.

Running as a Sysprep FirstLogonCommand

It's common to perform the Boot Camp drivers during a post-imaging Sysprep phase, so that it's possible to deploy the same image to different models without taking into account the model and required Boot Camp package. Brigadier seems to behave in the context of a SysPrep FirstLogonCommand.

There is one workaround performed by the script when running in this scenario, where the current working would normally be \windows\system32. In my tests on a 64-bit system, the MSI would halt trying to locate its installer components, due to the way Windows forks its System32 folder into SysWoW64 for 32-bit applications. When the script detects this working directory without a --output-dir option overriding it, it will set the output directory to the root of the system, ie. %SystemRoot%\.

By default, when --install is used, it will clean up its extracted files after installation, unless the --keep-files option is given, so unless you want to keep the files around you shouldn't need to clean up after it.

Running/building from source on Windows

If you'd rather run it as a standard Python script, you'll need Python for Windows (this was tested with the latest 2.7 release) in order to execute the script.

If you'd rather build it yourself, you can use the included build script. It requires Python and the matching version of pywin32. It handles downloading PyInstaller for you. Simply run it with no arguments, and it will build a zip file in the current working directory:

c:\python27\python build_windows_exe.py

Unpack details on Windows

On OS X, we have the native hdiutil and pkgutil commands to do the work of unpacking the driver files. On Windows, we:

  1. Check if 7-Zip is already installed - if not, we download and install it
  2. Extract the BootCampESD.pkg xar archive with 7-Zip
  3. Extract the Payload archive with 7-Zip, once to decompress gzip and again to unpack the cpio archive
  4. Use 7-Zip to extract the driver files from the WindowsSupport.dmg file within the pkg
  5. Uninstall 7-Zip if we installed it

Caveats

  • It requires a network connection, which therefore requires that a working network driver be available. The simplest way I've found to do this is to place the various network drivers from BootCampESDs inside a "BootCamp" (or similar) folder within C:\Windows\INF on a sysprepped image. This folder is the default search location for device drivers, and it should automatically detect and install drivers located here for all unknown hardware. You can also modify the DevicePath registry key to add a custom location, but using the existing INF folder means no other changes besides a file copy are required to update an existing image's drivers, so this can be done without actually restoring the image and booting it just to install a driver. Offline driver servicing using Windows and DISM is easy for WIM images, but most admins are likely not deploying WIM images to Macs, but rather using tools that wrap ntfsprogs.
  • It currently performs almost no error handling.
  • The 7-Zip downloads from a public URLs which is hardcoded in the script. Soon the brigadier.plist will support overriding these URLs with your own copies stored on a private webserver.
  • After installation, it sets the FirstTimeRun registry key at HKEY_CURRENT_USER\Software\Apple Inc.\Apple Keyboard Support to disable the first-launch Boot Camp help popup, and there's currently no option to disable this behaviour.
  • Only supports installations on 64-bit Windows. It's worth mentioning that the December 2012 Boot Camp driver ESDs seem to be 64-bit only, so extra work would need to be done to support 32-bit Windows. If 32-bit Windows support is important to you, there is an issue created to track it.

brigadier's People

Contributors

aaronkennedy avatar aweichman avatar flammable avatar macjustice avatar theaquamarine avatar timsutton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brigadier's Issues

iMac 15.1 (5k retina) not installing the AMD graphics drivers for Win7 Bootcamp installation

Hi Tim,
We have used Brigadier in our Organization for a couple of years to run in the firstruncommands section of an OOBE windows 7 Boot Camp image we created and it generally downloads all windows 7 drivers fine.
However, we have recently bootcamped (windows 7 64 bit installation) some 5k iMacs (iMac15,1 models) and our techs are reporting that it installs all drivers fine, except the AMD vga drivers. I am told (as I have not personally had a chance to test myself) that It does not give any indication of error and actually appears to all run successfully but no specific AMD drivers are installed.
We tried the latest 0.2.2 Brigadier exe but it did not resolve the issue. Any ideas of what may be happening?

Many Thanks,
Alan Martyn (UAL IT Dept. London)

not loading

I went into the correct directory where brigadier was with cmd, and typed brigadier.exe --model MacBookPro16,2
when i pressed enter, the cursor will will blink for a while, but returning to the state before typing the command

The black screen on Mac Mini 2010 server

Hi

Can you tell me what kind of model did you choose for this computer?

https://support.apple.com/kb/sp586?locale=en_US

Windows 1903

First of all, I tried the part of this guide to solve some issues with missing drivers:

"m) Delete all contents of C:\Insttemp WX
n) Download BootCamp 4.0.4033.zip <=== please choose the most recent version for your system ===>
o) Copy the downloaded file to C:\Insttemp WX
p) Extract the downloaded file to C:\Insttemp WX ( so that you can see a C:\Insttemp WX\Bootcamp folder after extraction )
q) In device manager, navigate to "Other devices - Coprocessor" and select it
r) Driver -> Update driver -> Browse my computer for driver software -> C:\Insttemp WX\BootCamp\Drivers\NVidia\NVidiaChipset64\SMU and click next. Wait until the update is finished.
s) In device manager, navigate to "Other devices - SM Bus Controller" and select it
t) Driver -> Update driver -> Browse my computer for driver software -> C:\Insttemp WX\BootCamp\Drivers\NVidia\NVidiaChipset64\SMBUS and click next. Wait until the update is finished.
u) Reboot your Mac"

https://forums.macrumors.com/threads/bootcamp-installation-for-unsupported-macs-w8-w8-1-w10-solution.1795357/page-2

I tried different Nvidia drivers (Bootcamp, Nvidia website), and I always see a black screen after rebooting my computer.

Additionally, I tried this method, but it doesn't work because probably PCI registers were set incorrectly by me using values from the post below:

"mm 05000004 1 ;PCI :7
mm 0017003E 1 ;PCI :8"

https://forums.macrumors.com/threads/win7-x64-booting-natively-via-efi-no-bios-emulation.696523/page-38

https://forums.macrumors.com/threads/bootcamp-installation-for-unsupported-macs-w8-w8-1-w10-solution.1795357/page-2

Could you help me?

7zip

I've "finally" persuaded where I am to try Brigadier as the amount of images one man is maintaining is getting frankly ridiculous.

Now my colleague preinstalls his images with 7zip version 9.2. This sadly does two things: 1) installs into the program files x86 directory and 2) causes the 7zip package brigadier needs to not be installed due to the detection code not picking up that it's the wrong version.

End result is the package fails to decompress and the installation fails.

May I suggest as a quick + dirty hack a forcible uninstall of any existing 7zip installs before putting on the version brigadier requires? We're going to work around this by no preinstalling it in future.

ioerror: [Errno socket error] [Errno 10054] An existing connection was forcibly closed by the remote host

Any thoughts on why we would be getting this error all the sudden?

C:\Users\admin>C:\BootCamp\brigadier.exe --install --keep-files --output-dir=C:\BootCamp
Using Mac model: MacBookAir7,2.

Model supported in package distribution file at http://swcdn.apple.com/content/downloads/39/14/031-55710/u2c6bi4yl91ud1lqc3k53bx9860hvsnf7z/031-55710.English.dist.

Distribution 031-55710 supports the following models: MacBook8,1, MacBookAir5,1, MacBookAir5,2, MacBookAir6,1, MacBookAir6,2, MacBookAir7,1, MacBookAir7,2, MacBookPro9,1, MacBookPro9,2, MacBookPro11,1, MacBookPro11,2, MacBookPro11,3, MacBookPro11,4, MacBookPro11,5, MacBookPro12,1, MacPro6,1, Macmini6,1, Macmini6,2, Macmini7,1, iMac13,1, iMac13,2, iMac13,3, iMac14,1, iMac14,2, iMac14,3, iMac14,4, iMac15,1.

Final output path C:\BootCamp\BootCamp-031-55710 already exists, removing it...

Making directory C:\BootCamp\BootCamp-031-55710..

Fetching Boot Camp product at URL http://swcdn.apple.com/content/downloads/39/14/031-55710/u2c6bi4yl91ud1lqc3k53bx9860hvsnf7z/BootCampESD.pkg.

100.0% 1614454784 / 1614454648 bytes
Traceback (most recent call last):
File "", line 339, in
File "", line 283, in main
File "", line 62, in downloadFile
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 93, in urlretrieve
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 239, in retrieve
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 358, in open_http
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 664, in http_error_301
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 450, in open_https
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 358, in open_http
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 664, in http_error_301
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 358, in open_http
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 436, in open_https
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 954, in endheaders
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 814, in _send_output
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 776, in send
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 1161, in connect
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\ssl", line 381, in wrap_socket
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\ssl", line 143, in init
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\ssl", line 305, in do_handshake
IOError: [Errno socket error] [Errno 10054] An existing connection was forcibly closed by the remote host

Error message on 2015 Macbook Air's

Seems to be a new PKG which i've put on my local network, but then installer throws up an error message saying installer doesn't exist, when you click ok bootcamp setup launches anyway, so not sure if its one part of installation missing or a rogue warning message - breaks unattended installation though.

no sound on macpro1,1 in w10

no sound coming from my macpro1,1 w10 insiders I mean I see sound mixer but no sound comes out when I try youtube in edge or even pianobar ;(

Some models not returning latest ESD

Hi There,

I've noticed that if I run brigadier with the option to specify model=MacBookPro7,1 it downloads BootCamp-041-2011 however I noticed when I used model=MacBookPro8,1 that it downloaded BootCamp-041-7018 which also lists MacBookPro7,1 as compatible.

I've noticed this with a few other models as well, will post them here when I make a list of them.

cheers,
Craig

macbookpro8-1
macbookpro7-1

Newest date is not newest version

This looks to be Apple's fault not yours, but the versions that brigadier is choosing to download are on older branches of the tree, in many cases. For example, with the model Macmini5,2, it returns:
031-0787: PostDate 2014-02-11 21:35:32
031-11273: PostDate 2015-02-09 18:42:37
Selecting 031-11273 as it's the most recently posted.

But 11273 turns out to be Boot Camp v4, whereas 0787 is v5. I'm trying to work around this at the moment by using brigadier's output to figure out the URL to download the PKG manually, but some way for brigadier to either find out the actual Boot Camp version number, or to let me specify on the command line something like "--package 031-0787", would be much smoother.

Thanks so much for this tool!

Not a real issue just wondering...

Your last release listed the catalog for Mavericks as an update.

That was a while back, can we update to Yosemite now or is it too soon?

Uninstall driver

Hi,

I would like to know how to uninstall the driver.
I successfully installed it but now the Boot Camp control panel cannot be deactivated whatever.

There is no uninstall option in the Boot Camp services in "Add or Remove programs".

I'm on Windows 10 Pro...

Thanks a lot for your help!!

can't download bootcamp for MacBookAir7,1

D:\thunderdownload>brigadier.exe -m="MacBookAir7,1"
Using Mac model: =MacBookAir7,1.

Traceback (most recent call last):
File "", line 358, in
File "", line 217, in main
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2",
ine 126, in urlopen
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2",
ine 406, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2",
ine 519, in http_response
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2",
ine 444, in error
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2",
ine 378, in _call_chain
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2",
ine 527, in http_error_default
urllib2.HTTPError: HTTP Error 502: Bad Gateway

Put all drivers in image?

Hi Tim,

Great app, I think it will be just what we need to deploy to our macs we set up for customers that want Windows installed as default.

Ideally, what id do is deploy my generzlied sysprepped clone - boot it for them once so all the drivers are installed and then when it came to start setting up the system, shut down with CTRL+F10 and typing "shutdown /s" that way our novice users will be presenter with their Win 7 or Win 8.1 OOBE screen without any long wait or driver downloads/restarts

The problem with this for me is, we have a really slow internet connection, so continually loading the drivers is a nightmare - would it not make more sense to have all the drivers available in Apple's Boot Camp catalog within the image? Is there a reason for this? (huge size?) - failing that, how about on an external drive...I suppose the issue here is the same as the network one, you don't have Thunderbolt/USB3 support straight away?

So presumably the custom URL case would be for us to server them on our LAN? At least then the computer would be getting them are near gigabit speeds instead of over our dire internet - do you have a tutorial on how we might be able to grab all the ESD and drivers for all the current Mac's in the Apple Store and the catalog file to host them on our internet/lan server?

Error on Mid2013 MBAirs

Hello,

I am seeing this error when running both the exe on Windows or executing the python script on OSX. I have a custom .plist that I have been using with success that points to our local SUS server. There were two recent ESDs (091-7571 and 091-5062) that were released that I am wondering if it is having issues with, as I have run this tool successfully before on the same model. Other models, at least the ones I have tested, do not have issues. Here is the error when running the script.

Using Mac model: MacBookAir6,2.

Traceback (most recent call last):
File "./brigadier", line 324, in
main()
File "./brigadier", line 197, in main
distfd = urllib2.urlopen(disturl)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 394, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 412, in _open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1199, in http_open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1174, in do_open
urllib2.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>

If I run the tool without the plist and go to Apple's SUS it is fine. Here is the plist I am using.

CatalogURL http://myservername.coolplace.org:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

Here are the logs of the client on the SUS server:

10.10.18.109 - - [03/Oct/2013:13:51:34 -0400] 80 GET "/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" 200 1983902 "-" "Python-urllib/2.7"
10.10.18.109 - - [03/Oct/2013:13:56:43 -0400] 80 GET "/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" 200 1983902 "-" "Python-urllib/2.7"
10.10.18.109 - - [03/Oct/2013:14:10:43 -0400] 80 GET "/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" 200 1983902 "-" "Python-urllib/2.7"
10.10.18.109 - - [03/Oct/2013:14:11:10 -0400] 80 GET "/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" 200 1983902 "-" "Python-urllib/2.7"
10.10.18.109 - - [03/Oct/2013:14:11:24 -0400] 80 GET "/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" 200 1983902 "-" "Python-urllib/2.7"

Let me know if I am missing something and thanks again for your work on this script, it is great!

Could not find ESD for iMac10,1

"Couldn't find a Boot Camp ESD for the model iMac10,1 in the given software update catalog."

I am on a late 2009 iMac all-in-one, serial W801552H5PE, with Win10 freshly installed

Can't complete downloading

Whenever I download the MacPro5,1 drivers, it downloads but gets stuck at 1 specific point. I have 7-zip installed but it just can't complete the install.

empty folder

it downloaded all the 6GB but it only left an empty folder named bootcamp_061....

Unable to install bootcamp for MacPro5,1

Hello,

I followed a guide for installing the drivers for my MacPro5,1 from here:

https://forums.macrumors.com/threads/how-to-boot-camp-without-a-boot-screen.2114788/page-9#post-26689280

My Problem is with that part:

  1. Open Command Prompt (search CMD can find it)

  2. type
    Code:
    e:

  3. type
    Code:
    brigadier -m MacPro5,1

  4. Once finished, rename the "Bootcampxxxxxxxxxx" folder to "Bootcamp5"

  5. search CMD again, but this time right click, and choose "run as admin"

  6. type
    Code:
    e:

  7. type
    Code:
    cd Bootcamp5/Bootcamp/Drivers/Apple

  8. type
    Code:
    msiexec /i bootcamp.msi

When I try to execute that command, it says, I need to install windows 7, even though I have windows 10 1803 version installed.

I tried it several times. Is there an issue with the downloaded files or how can I fix that issue?

Thx in advance

Select Target OS for Driver Download

With the release of Windows 10 Drivers the software always grabs the latest version. This latest version will not install with the installer on Windows 7 x64 with the tested model (Mac Mini Mid 2012). Can we specify a target OS version?

HTTP Error 403: Forbidden

Hi,

Please help, What could be the cause of this error 403: Forbidden. It was downloading yesterday, but due to not enough space, it failed during extraction. Therefore, I erased the windows partition and reinstall in a bigger partition size this time, but now this error occured.

C:\Users\User\Downloads\brigadier-0.2.4\brigadier-0.2.4>brigadier.exe -o testing -m MacBookAir 7,2
Using Mac model: MacBookAir.

Traceback (most recent call last):
File "", line 339, in
File "", line 186, in main
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2", line 126, in urlopen
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2", line 406, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2", line 519, in http_response
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2", line 444, in error
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2", line 378, in _call_chain
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib2", line 527, in http_error_default
urllib2.HTTPError: HTTP Error 403: Forbidden

7-Zip custom path detection failure

I have 7-zip 18.05 installed in a custom path. 7-zip stores its location in the HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip\Path and Path64 values. Brigadier fails to locate it, tries to install it, then fails:

We need to install 7-Zip..

7-Zip install returned exit code 1603.

Extracting...

Calling 7-Zip command: C:\Program Files\7-Zip\7z.exe e -oc:\users\user\appdata\local\temp\bootcamp-unpack_b9jj6g -y c:\users\user\appdata\local\temp\bootcamp-unpack_b9jj6g\BootCampESD.pkg

Traceback (most recent call last):
  File "<string>", line 339, in <module>
  File "<string>", line 296, in main
  File "<string>", line 73, in sevenzipExtract
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\subprocess", line 493, in call
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\subprocess", line 679, in __init__
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\subprocess", line 896, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified

Shouldn't the 7-zip path in the registry be used instead of the current detection system?

New iMac models are not supported

when running either .\brigadier.exe -m "iMac21,2" or .\brigadier.exe -m "iMac21,1", I get Couldn't find a Boot Camp ESD for the model iMac21,2 in the given software update catalog.

Error with windows 8.1 on MacBook5,2

Hi,
I downloaded bootcamp but an error is reported when setup.exe is started:
Boot Camp x64 is unsupported on this computer model

the windows version installed is 8.1 on a MacBook5.2
can I do something to fix it?

Thanks

Gianluca

Brigadier Fails at 7Zip Extraction

Hi,

Thanks for taking the time to develop this tool. I'm getting a failure at the point Brigadier is trying to extract the 7zip file. Here's the console ouput:

...
Fetching Boot Camp product at URL http://swcdn.apple.com/content/downloads/39/14/031-55710/u2c6bi4yl91ud1lqc3k53bx9860hvsnf7z/BootCampESD.pkg.

100.0% 1614454784 / 1614454648 bytes
100.4% 1662976 / 1655808 bytes
Downloaded 7-zip to c:\users\ben\appdata\local\temp\tmpvcaver\7z1514-x64.msi.

We need to install 7-Zip..

7-Zip install returned exit code 1603.

Extracting...

Calling 7-Zip command: C:\Program Files\7-Zip\7z.exe e -oc:\users\ben\appdata\local\temp\bootcamp-unpack_ifd_bk -y c:\users\ben\appdata\local\temp\bootcamp-unpack_ifd_bk\BootCampESD.pkg

Traceback (most recent call last):
File "", line 358, in
File "", line 309, in main
File "", line 86, in sevenzipExtract
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\subprocess", line 493, in call
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\subprocess", line 679, in init
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\subprocess", line 896, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified

Not sure if this is a bug or something with my system, so any thoughts would be greatly appreciated.

Noob Question

Hello,

I DLed brigadier.exe 0.2.4 and ran it on a fresh install of Win10 x64 on a macbook2,1.
It found 2 different compatible bootcamp ESDs and DLed the most recent one (approx. 620MB).
Then it quickly displayed something about 7zip and the terminal window closed... The DL folder was empty...

I read this issue (#22) and thus went looking into C:\Users<user>\AppData\Local\Temp\ and found a bootcamp directory containing BootcampESD.pkg (approx. 620MB) and another directory containing 7z1514-x64.msi (7zip install file). I installed 7zip and then tried to do unpack the pkg file but it didn't work (I end up with a "payload" file).

What should I do with the pkg file?

Thank you very much in advance for your help.
Best,
-a-

Query: Does brigadier resume a download

Hi,

This is a query, not an issue. While downloading a bootcamp my MacBook Pro running Windows 10 64bit went into standby after about 25% of download was completed. Does it resume the download when the wakes up again. Till half an hour there is no activity.

Thanks
Amal

Choosing the right product ID from multiple candidates

Sometimes there are multiple products for a model. As an example, there are two different products for Macmini6,2 as of today: 031-12187 has a BootCamp tag, 031-0787 has a BootCampAutoUnattend tag.

Since this is a machine without an optical drive, what would cause it to pick anything but BootCampAutoUnattend? (Old OS?) Should we just always prefer the one with AutoUnattend unless the user specifies otherwise?

Overlapping ESDs

I see that an update was made to handle the overlapping ESDs by searching for the bootcampautoupdate tag, however in doing this brigadier will download the older package. The sucatalog file does have a date field. Instead Would it be a good idea to use the date field to compare which package is the newest and download that one?

Point brigadier to local copy of BootCampESD.pkg on Windows

Hi, cool project.

I'm working in an area with very limited internet access. I have the appropriate BootCampESD.pkg for my system already downloaded, and I have brigadier on that system. The system only has Windows. Now, how can I point brigadier to the local pkg and convert it to a Windows executable?

Thanks

The download directory is always empty

I ran brigadier.exe multiple times already, and I can see in the console that it is downloading the files, however, the output folder is always empty at the end of the download.
Do you guys know what's happening ?

Empty folder

Hi,
I try to download the drivers for my iMac 27'' late 2013 for W10: The program shows download actity and then ends without error message but leaves the download folder empty.
What's wrong?

Handle new Boot Camp ESDs that use AutoUnattend.xml

As of yesterday, two new ESD updates now offer two different installers for a large cross-section of Mac models, which use a special tag in the dist file: BootCampAutoUnattend

These work by executing the setup.exe as a FirstLogonAction, but the actual installation is still manually initiated.

Very preliminary testing seems to show that these unattend versions can still be installed silently using the msiexec command we already use.

One solution would probably be to simply prefer the BootCampAutoUnattend tag if it exists, but some further testing should be done to determine what scenario Boot Camp Assistant will pull one or the other.

Currently, the iMac13,3 (a 3TB-equipped iMac with special EFI code to support exposing GPT to Windows??) is a previously-unlisted-in-ESDs model that's only available the AutoUnattend driver version.

A temporary solution to prevent it from breaking on all other models has been pushed in version 0.1.3, which simply skips any dist found with a BootCampAutoUnattend tag.

Desperately -need -an -uninstall -option

(dodgy text incoming, apologies)

I -installed -the -driv#er -in -a -hope -to -fix -my -mac] -keyboard -on -my -windows -PC.8 -Sinc]e -then -I -had -resolv#ed -the -issue.8 -I -had -followed -this -tutorial https://www.youtube.com/watch?v=A8_4pPs-l38

(As -you -c]an -see ) -it's -mapped -all -of -the -keys -inc]orrec]tly -now -and -I -c]annot -uninstall -the -driv#er.8 -

The -keyboard -works -fine -on -my -Mac]book -Pro 2015 -so -it -is -definitely -the -driv#er that -is -c]ausing -these -issues.8

Any -help -would -be -greatly -apprec]iated. -I -don't -want -to -spend -money on -another -keyboard -or -reformat -my -OS

Remapped keys:
Space --> -
c --> c]
v --> v#
, --> ,7
. --> 8
7 --> ,7
8 --> .8
There -may -be -some -others -but -I hav#en't -found -them -yet.8

IOError: [Errno socket error] [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Perhaps not a brigadier issue per se, but maybe someone could help...

Disabling Windows firewall did not help...

Output below:

C:\Users\XXXX\Downloads>brigadier -m MacPro5,1
Using Mac model: MacPro5,1.

Model supported in package distribution file at http://swcdn.apple.com/content/downloads/57/55/041-84868-A_402D0DFI39/6uz8hhgtd4b87t00mrq0uihiop5ivumsbk/BootCampESD.dst/041-84868.English.dist.

Distribution 041-84868 supports the following models: MacBook2,1, MacBook3,1, MacBook4,1, MacBook5,1, MacBook5,2, MacBook5,3, MacBook6,1, MacBook7,1, MacBookAir1,1, MacBookAir2,1, MacBookAir3,1, MacBookAir3,2, MacBookPro2,1, MacBookPro2,2, MacBookPro3,1, MacBookPro4,1, MacBookPro5,1, MacBookPro5,2, MacBookPro5,3, MacBookPro5,4, MacBookPro5,5, MacBookPro6,1, MacBookPro6,2, MacBookPro7,1, MacBookPro8,1, MacBookPro8,2, MacBookPro8,3, MacPro1,1, MacPro2,1, MacPro3,1, MacPro4,1, MacPro5,1, Macmini2,1, Macmini3,1, Macmini4,1, iMac5,1, iMac6,1, iMac7,1, iMac8,1, iMac9,1, iMac11,1, iMac11,2, iMac11,3, iMac12,1, iMac12,2.

Model supported in package distribution file at http://swcdn.apple.com/content/downloads/26/08/041-84821-A_AMCFPC3QDK/4fffs8qgdflw7pn1finqqd40gifh41mvs6/041-84821.English.dist.

Distribution 041-84821 supports the following models: MacBookAir4,1, MacBookAir4,2, MacBookAir5,1, MacBookAir5,2, MacBookPro6,1, MacBookPro6,2, MacBookPro8,1, MacBookPro8,2, MacBookPro8,3, MacBookPro9,1, MacBookPro9,2, MacPro4,1, MacPro5,1, Macmini5,1, Macmini5,2, Macmini5,3, Macmini6,1, Macmini6,2, iMac11,3, iMac12,1, iMac12,2, iMac13,1, iMac13,2, iMac13,3.

Model supported in package distribution file at http://swcdn.apple.com/content/downloads/04/44/041-84708/yq9w47gthzu8e8fqmad6hx0vs15fuk4540/041-84708.English.dist.

Distribution 041-84708 supports the following models: MacBook2,1, MacBook3,1, MacBook4,1, MacBook5,1, MacBook5,2, MacBook5,3, MacBook6,1, MacBook7,1, MacBookAir1,1, MacBookAir2,1, MacBookAir3,1, MacBookAir3,2, MacBookPro2,1, MacBookPro2,2, MacBookPro3,1, MacBookPro4,1, MacBookPro5,1, MacBookPro5,2, MacBookPro5,3, MacBookPro5,4, MacBookPro5,5, MacBookPro6,1, MacBookPro6,2, MacBookPro7,1, MacBookPro8,1, MacBookPro8,2, MacBookPro8,3, MacPro1,1, MacPro2,1, MacPro3,1, MacPro4,1, MacPro5,1, Macmini2,1, Macmini3,1, Macmini4,1, iMac5,1, iMac6,1, iMac7,1, iMac8,1, iMac9,1, iMac11,1, iMac11,2, iMac11,3, iMac12,1, iMac12,2.

There is more than one ESD product available for this model:
041-84868: PostDate 2019-10-22 15:58:15
041-84821: PostDate 2019-10-22 15:58:14
041-84708: PostDate 2019-10-16 22:15:07
Selecting 041-84868 as it's the most recently posted.
Final output path C:\Users\XXXX\Downloads\BootCamp-041-84868 already exists, removing it...

Making directory C:\Users\XXXX\Downloads\BootCamp-041-84868..

Fetching Boot Camp product at URL http://swcdn.apple.com/content/downloads/57/55/041-84868-A_402D0DFI39/6uz8hhgtd4b87t00mrq0uihiop5ivumsbk/BootCampESD.pkg.

100.0% 632610816 / 632605139 bytes
Traceback (most recent call last):
File "", line 339, in
File "", line 283, in main
File "", line 62, in downloadFile
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 93, in urlretrieve
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 239, in retrieve
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 344, in open_http
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 954, in endheaders
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 814, in _send_output
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 776, in send
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 757, in connect
File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\socket", line 571, in create_connection
IOError: [Errno socket error] [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Not sure, doesn't seem to work or do as described.

It spends 10 minutes downloading nothing - the directory it says on the screen that it's creating and saving to is completely empty after the process. There are files in temp, but again it says on the screen that it's is saving it somewhere else. The file in the temp folder is a .pkg, but after extracting with 7zip, there is just another unknown file. It did not install anything with the -i and like it says in the title just doesn't seem to work as it should. I'm going to just use another method, but wanted to let you know that this might be out of date.

SSL download error

Hi,

I have the following error when executing brigadier 0.2.4:

>brigadier.exe
Using Mac model: Macmini8,1.

Model supported in package distribution file at http://swcdn.apple.com/content/downloads/23/15/041-91731-A_LBI7Q8UWOG/juk1ng0hm623gxh3jv4qxt190ga1h5p0lw/041-91731.English.dist.

Distribution 041-91731 supports the following models: Macmini8,1.

Making directory C:\Users\xxx\Downloads\BootCamp-041-91731..

Fetching Boot Camp product at URL http://swcdn.apple.com/content/downloads/23/15/041-91731-A_LBI7Q8UWOG/juk1ng0hm623gxh3jv4qxt190ga1h5p0lw/BootCampESD.pkg.

100.0% 548143104 / 548136308 bytes
Traceback (most recent call last):
  File "<string>", line 339, in <module>
  File "<string>", line 283, in main
  File "<string>", line 62, in downloadFile
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 93, in urlretrieve
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 239, in retrieve
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 358, in open_http
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 664, in http_error_301
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 450, in open_https
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 358, in open_http
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 664, in http_error_301
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 358, in open_http
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 371, in http_error
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 634, in http_error_302
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 660, in redirect_internal
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 207, in open
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\urllib", line 436, in open_https
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 954, in endheaders
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 814, in _send_output
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 776, in send
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\httplib", line 1161, in connect
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\ssl", line 381, in wrap_socket
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\ssl", line 143, in __init__
  File "c:\jenkins\workspace\brigadier\build\brigadier\out00-PYZ.pyz\ssl", line 305, in do_handshake
IOError: [Errno socket error] [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

Am I the only one having this?
How can I fix it?

Running the app a second time deletes the previous download

So, after successfully downloading the installESD.pkg, and then having the install failed due to the hard coded 7-zip url now being invalid (manual install of 7-zip worked around that). Then discovering that the download is deleted when the app exits, I ran the app again using -k -I options. The install failed because a log was not found. Good news is that the files were still there, so I ran the app again with admin rights and the first thing it did was delete the files.

What is the point of having a flag (-k) to say keep the files, if their going to be deleted on a subsequent execution? Perhaps a better solution would be to check if the file is there and then attempt to use it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.