Today's post is a bit of a rant. Also, it took me so long to write, that I didn't want to spend much more time formatting it. So, if it looks a bit messy, I'll try to get back and clean it up a bit later. If you've been reading my blog, you know that I'm in the process of a network deployment. Recently, we qualified for a (basically, free) computer form UPS. Unfortunately, all they had to offer were machines with AMD processors and chipsets. If you haven't guessed it by now, I'm an Intel guy. And now, I know why.
The Problem with AMD
Apparently, AMD doesn't want to make it easy for (particularly small) business to install their software. This is evidenced by the fact that they have completely non-standard Windows installers. They probably use InstallShield for some of their software (which, arguably, makes horrible installers, in my opinion, after having looked at just a few InstallShield MSIs with ORCA from Microsoft). However, their Catalyst Display Driver package uses something called Monet, which until last week, I've never heard of before. And let me say that I hope I never hear of it again, as it caused me nothing but trouble this week.
The idea is that I'm using the Microsoft Deployment Toolkit 2008 to deploy my clients. This driver comes with software that I would like to have installed on the machine, so I decided to go ahead and install the whole package (minus a few items that I really don't need). But it turned out to be a real chore. To start, there is the lack of documentation. Here's the help documentation from Setup.exe and InstallManagerApp.exe, which are responsible for the GUI installation:
Well, I'm confused already. But here's what happens. If you use the slash (/) switches, you can get an unattended GUI install. What do I mean? What I mean is, if you use the right combination of switches, you can achieve an unattended install that still shows a GUI. Ok, that's not so bad. Let's step through these switches a bit. By specifying /UNATTENDED_INSTALL, you would think that would be all I have to do to achieve my goal. Well, you would be wrong. Even when using this switch, the installer stops on the very first wizard page to ask what language you want. Why do I need to choose a language if I'm doing an unattended install? (More precisely, if no language is specified on the command line, English ought to be the default and installation should proceed unattended.) So, in order to get around this, we need to pass the /FORCE_HIDE_FIRST_RUN switch, which does just that—it skips the language selection step. So you run the new command and now the wizard appears to stop in its tracks on the last page and just sits there. That's because even during an "unattended" install, the setup program expects you to click the Finish button. Stupid. So we need to pass the /FORCE_CLOSE_WHEN_DONE switch. Just to be extra cautious, I pass the /AUTOACCEPT_ALL switch, which automatically accepts all EULAs (which according to AMD is supposed to be unpublished, hehe). I also pass the /ON_REBOOT_MESSAGE:NO switch to make sure the installer doesn't tell the operating system to reboot, a big no-no when using the Microsoft Deployment Toolkit. So our final command looks like this: setup.exe /UNATTENDED_INSTALL /FORCE_HIDE_FIRST_RUN /FORCE_CLOSE_WHEN_DONE /AUTOACCEPT_ALL /ON_REBOOT_MESSAGE:NO
.
Well now there are three problems. In older releases of the Catalyst Display Driver package, HydraVision was installed with everything else and the Windows Vista Experience Index score was also updated so that the Aero user interface would be enabled. This no longer happens in the 9.4 release of the package. It turns out they have a few errors in their new install routine. The lack of installation of HydraVision (a multi-desktop or even desktop spitting application) can be gotten around by replacing /UNATTENDED_INSTALL with /UNATTENDED_INSTALL:"
Enabling the Aero user interface (in an unattended manner) is also similarly easy. In previous releases, there was an MSI called EnableAero.msi. At first, I was including this in the installation, but I soon realized that all the MSI was doing is running the following command: C:\Windows\System32\WinSat features
C:\Windows\System32\WinSAT formal
. So, number one, the EnableAero.msi installer is completely unnecessary. Secondly, the way they are running the command is also unnecessary. Instead, there is a command line switch that enables you to only update the graphics and restart the Display Window Manager: C:\Windows\System32\WinSAT dwm
.
Now we have achieved the following: an unattended installation (though, still showing a GUI) that installs HydraVision and enables the Aero user interface in Vista. But what if we want a truly silent install? Is this possible? Yes, it is. There are two ways of doing this.
First, there is a file called ATISetup.exe in the Bin{64} folder of the Catalyst Display Driver package. If you run this file without any command line options, you will see the following command line options (there are more, but for brevity, which it's already too late for, I'll omit the unimportant ones):
- -install
- Performs a silent install
- -uninstall [all]
- Performs a silent uninstall ([all] uninstalls all hidden packages)
- -output screen [detail]
- Screen outputs basic information to the console while including detail will output more verbose information. Useful for debugging.
- -h #### -v #### -b ## -j ###[ddc]
- Sets the horizontal resolution, vertical resolution, color depth (or bits per pixel (a/k/a bits per pel)), and vertical refresh rate. Using DDC for the vertical refresh rate tells the driver to get the information from the monitor via DDC or EDID, if the monitor supports it. Most LCDs in use do, as do most CRTs that are left in use. Also, be aware that the documentation for these switches is incorrect: -b only takes 2 digits, and -j can take 3. They have this reversed on their display of the help options (and thus, you can specify 120Hz refresh rate for your CRT if it supports it).
Here's the kicker: you try to run the following command: ATISetup -install -h 1280 -v 1024 -b 32 -j ddc
, and it doesn't work. The install occurs, but again, HydraVision is not installed, and when you reboot, the display defaults to a resolution of 800 x 600 @ 32-bits. Again, the problem with HydraVision can be fixed and the installer used, but not the screen resolution. For me, this is back to square one. Why did I go through all of this? To save you the trouble—and to pick on AMD.
So how do I get the driver to install, with all the companion applications, and have the screen resolution set to the desired size and enable the Aero user interface? It comes down to two lowly batch files (or in Vista world, a .cmd file).
First, we need to write the batch (or command) file that will install the driver and companion applications. Apparently, what really happens when you run the Setup.exe file in the root driver package with the -install switch, it just passes it onto the .\Bin{64}\ATISetup.exe installer. If you use the slash (/) switches, then the GUI installer is used (e.g. the GUI installer is shown, but is unattended if you use the switches I outlined above).
Here's the install batch file (I named it install.cmd):
NOTE: You may freely copy and use the batch file source code contained in Figures 2 and 3 of this blog entry without needing to give attribution. I hope someone may find it useful.
This will (more or less) silently install the driver and all accompanying software that you chose. (NOTE: I removed the following folders from the \Packages\Apps directory: CatalystRegistration (a registration nag-ware) and Blizzard (an Internet shortcut to download a trial version of the game World of Warcraft.) Once this batch file has been executed, you need to restart the computer. (NOTE: if you are using the Microsoft Deployment Toolkit to deploy your operating system, you must tell MDT that the application requires a reboot and let MDT reboot the computer or you will mess up the automated deployment.)
Once the computer has rebooted, your video resolution will be 800x600 @ 32-bit. Unfortunately, Windows still does not have a way to "script" the video resolution through an API. No Windows Script interface, no WMI, no PowerShell. So we are left to "hacking" the Windows registry. Please note that the batch file below has only been tested on Windows Vista. For any other operating system, verify the keys that need to be set (perhaps the resolution switches only work for Windows XP and below?).
The > nul
makes the batch script not output anything to the screen since REG.exe and WinSAT probably use stdout or stderr bypassing the @ECHO OFF
command in the batch file. I called this batch file SetVideoRes.cmd. It first uses REG QUERY to determine the GUID of the video card and stores it in a variable. Then it creates several registry entries in the registry pertaining to the display resolution. Finally, it runs the Windows System Assessment Tool to enable the Aero user interface. Once this script has run, the computer needs to be rebooted again so that Windows picks up the new display resolution settings. And finally, there you have it, a completely unattended installation of the Catalyst Display Driver package. Too much work. For Intel, this would have been as easy as calling setup /s /v/qn
if it's an InstallShield installer or <driver_installer>.msi /qn /norestart
if it were an actual Windows MSI.
I hope this helps someone out there. It took me a whole week, installing the operating system about 25 times to figure this all out. What a pain! I did contact AMD Customer Care, but they basically told me that they provided limited unattended install support and that they only supported unattended installs on Windows Vista for particular ATi products. Poor business practice, in my opinion. Not everyone is a Hewlett-Packard or a Microsoft.
One final note, I just finished a book on microformats on the web. This blog entry is long enough, so suffice it to say, I've tried my hand at a few hCard entries in this post. Not every company mentioned has an hCard entry. I may go back and update this entry later. I mention this only for those who may be looking. I'm going to write more about that in another post.
That's it for now. Sorry it was so long. Take care.
Updates
- 2009-05-14 - Fixed code in SetVideoRes.cmd in figure 3: Added quotes around the registry key because the keyname has a space. Also removed the warning about testing on Vista. I have tested the code and it does work. However, it should go without saying that anything you take off the Internet should be tested in a secure, isolated environment before being put into production. Also fixed my SetVideoRes.cmd batch file to call
C:\Windows\System32\WinSAT formal
to make sure that the experience score actually gets updated in the System display window.
Hi,
ReplyDeleteI happened upon this post while trying to do a silent install of the ATI Catalyst 10.1 drivers. I tried running this but it doesn't seem to work:
setup.exe /UNATTENDED_INSTALL /FORCE_HIDE_FIRST_RUN /FORCE_CLOSE_WHEN_DONE /AUTOACCEPT_ALL /ON_REBOOT_MESSAGE:NO
I figured out that it's still hanging on the language selection windows even though I specified /FORCE_HIDE_FIRST_RUN. I'm not too sure if anything changed between 9.4 and 10.1 (except for the installer becoming more lame) but I was wondering if you had any tips?
Thanks!
Patrick
Patrick:
ReplyDeleteSorry, but I haven't touched this driver software since v9.4. By now, I guess I need to upgrade my own driver package and install routine.
Undoubtedly, as you have noticed, ATI Catalyst is a pain for business, especially when it comes to unattended installation.
Why, when MSI has been around for 10+ years, can't companies get installations right? Why do they not take the time to make them be able to perform unattended installation? It's not that difficult to do, especially once you've got the GUI installation routine complete.
If anyone has more information on the latest ATI Catalyst driver packages, please feel free to leave a comment or a link to your information (e.g. your blog post on the subject) and I will post the appropriate information for others to find.
Thanks.
Hi
ReplyDeleteanother option for unattended install of ATI drivers is to download them separately (graphic driver, chipset driver, HDMI driver - from realtek site, etc.), unpack them by launching their installer and install them by typing setup -s
Personally I use this batch file in conjunction with SFXMaker (I use it to create silent install packages) :
==================
cmdow @ /HID
@Echo Off
setup -s
EXIT
==================
PS sorry but English is not my first language.
Thank you for your comments. The problem is, the unattended install does not allow you to set the desired target video resolution (without running additional batch scripts to modify the registry). In addition, the process is not well supported nor documented and is not truly unattended without setting the proper command line parameters; it's not as simple as -s (at least, as of the version that my original entry was written about).
ReplyDeleteI've been working with various versions of the Catalyst (CCC) installer for Windows XP, and I have some new information. Versions 9.11 up to current of the installer use a \Packages directory structure, and seem to use the /UNATTENDED_INSTALL and other switches as Craig documented. (Thanks, Craig!)
ReplyDeleteVersions 9.10 back through 9.4 (at least) use a different structure (with an install.ini) and they didn't like the documented switches, but a silent install was possible using the setup.exe /K [/KL logfile] switches.
Why investigate so many versions? Because it looks like the version of CCC must match the version of the ATI driver, at least approximately. When it doesn't, when you use CCC 10.5 with drivers from 2009 and 2008, you can install but upon launching CCC abends immediately with a kernel32.dll exception.
However, CCC version 9.4 (from April 2009: 9.4--get it?) seems to work with many ATI drivers back as far as August 2008 without abending. I don't know if all features work, but at least you can install and launch the software.
To find these older versions on the ATI/AMD Web site, search for "previous catalyst XP". I'm about to start testing the Windows 7/Vista versions of Catalyst to see if the same rules apply.
I spoke too soon. Oh, the information about the different installer structures and different command lines is correct. But Catalyst version 9.4 does not work with all older drivers; it appears to only work with some of them. So I still don't have a solution for a universal Catalyst version.
ReplyDeleteAs for Windows 7 and Vista, all these Catalyst installer versions (at least 10.5 and 9.4) seem to use the newer \Packages directory structure that matches the commands Craig documented. I'm not making any compatibility claims, for now.
When using the \Packages installer, Setup.exe is just a shell that calls InstallManagerApp.exe. If you want to run something after the installer finishes, it's the latter you have to wait to finish, not Setup.exe.
Sande:
ReplyDeleteThanks for your comments and for providing the information. I'm glad to see that the ATI driver package is moving in the right direction. Keep me updated!
Currently testing
ReplyDelete/UNATTENDED_INSTALL /FORCE_HIDE_FIRST_RUN /FORCE_CLOSE_WHEN_DONE /AUTOACCEPT_ALL /ON_REBOOT_MESSAGE:NO
with 10.02 legacy + win7 64
Has anybody had good success yet so far? Have those bugs with hydravision or whatever been resolved or is this not applicable to newer cards?
Looking for a way to push CCC Version 11.6 to Windows 7 clients via Group Policy.
ReplyDeleteThanks for this excellent post. I have tested the following (which I got from this page) in Windows 7 x64 with success:
ReplyDeleteSetup.exe /UNATTENDED_INSTALL /FORCE_HIDE_FIRST_RUN /FORCE_CLOSE_WHEN_DONE /AUTOACCEPT_ALL /ON_REBOOT_MESSAGE:NO
The only problem was that it launches as a separate process so if you're running this from a batch file and doing anything afterwards in the same batch file, it won't wait for the ATI Installation to complete. It just moves on. I added the following to do a loop looking for the installer process and only continuing once the installer process is no longer found. Hope this helps.
:CHECKIFSTILLINSTALLING
%windir%\Temp\Sleep.exe 5
%windir%\System32\Tasklist.exe /FI "IMAGENAME eq InstallManagerApp.exe" >%windir%\Temp\TasklistFindInstallManagerApp.txt
for /f "tokens=1 delims= " %%a in ('type %windir%\Temp\TasklistFindInstallManagerApp.txt^') do set ISRUNNING=%%a
If %ISRUNNING% EQU InstallManagerApp.exe GOTO CHECKIFSTILLINSTALLING
If %ISRUNNING% EQU INFO: GOTO END
does anyone have a solution for silent install so far
ReplyDeleteI would like to say THANK YOU!!! This post is exactly what I needed for my MDT Deployment, in order to install these lovely ATI Drivers, as I found that the driver packs from Lenovo, would not even allow MDT to correctly inject these ATI Drivers.
ReplyDeleteFor everyone's benefit, this is what worked for me.
I created an Application Install Step. The Working Directory being "Driver Main Folder\Bin64" and then the command I am running is .\atisetup.exe -install -output screen -log
This gives me visual output for confirming that everything is working, and a log file to check for any errors. Since my MDT is more for automation and time saving purposes than to hide installers from end users, I prefer the screen output. Based on the other comments above, this method also avoids the steamrolling forward and MDT does await for the install to be complete.
Thanks again for this post, as I had spent days looking for this information, and was almost resigned to turning this into a manual "post image" process.
Cheers!!