Edited to remove references to Enterprise edition when not appropriate.
Google Desktop has been in use at our organization long before I started here, however one of the things that’s irked me about it is the lack of official 64-bit support. Specifically, installation is possible on 64-bit editions of Windows, however a flag (specifically, the ‘/force’ flag) is required when running the installer to get it to actually install.
So although I can manually install the app on workstations, it’s a bit of a pain as a lot of the 64-bit machines were missed when they were originally setup. As such, I whipped up a nice little GPO that takes care of everything for me, and has some flexibility for installation detection. There are probably easier ways of doing this, but I was in a rush when I wrote the script, and it works very well.
Instructions
To start, download the Google Desktop Enterprise package. This contains a .ADM file that can be used in both Server 2003 and Server 2008 Group Policy Management consoles. Create a new GPO, and import the .adm in to the User ConfigurationPoliciesAdministrative Templates object (Server 2003 doesn’t have the Policies folder, it just goes right to Administrative Templates). It’s important to do it on the User side rather than the computer side, given the actual installation process.
After the import, it’s important to note that Server 2008 will place the Google object under Classic Administrative Templates (ADM), instead of just in the Administrative Templates folder. Now configure the settings you want for GDE, and you’re almost set.
Here’s the fun part now – the actual installation. Download the Google Desktop Setup file from Google. Because I’m too lazy to make a transform for the .MSI, I dug back in to my DOS knowledge and made a batch file to map a drive to a server with a publically-available share, run the Google Desktop installer from the mapped drive with the /force switch, and then disconnect the drive.
The main advantage to doing this if I want to update the installer with a newer version later, I just have to swap out the file – I don’t have to screw around with transforms again. The script goes as follows:
@ECHO OFF
Color 1F
Title Google Desktop Installer
c:
cd \windows\system32
if exist “gds_installed” GOTO End
ECHO Installing Google Desktop Search
ECHO.
net use x: \\public\installs >nul
start /wait x:\GDE\GoogleDesktopSetup.exe /force /silent
net use x: /delete >nul
echo Installed > gds_installed
exit
:End
ECHO Google Desktop Search already installed! Exiting!
exit
Alter the server name (public in the example) and path to the installer, and then save the file with the .BAT or .CMD extension in the domains scripts folder, or somewhere accessable to users that will be running the script. Remember, users have to have Read and Execute permission to the folder containing the setup executable and the script.
Once saved, add the batch file to the GPO’s logon script (again, under User Configuration). Once done, link the GPO to the Organizational Units (OU’s) that you want GDE installed. Presto! You’re done!
The Script Explained
The very first part makes the window a nice blue with white writing and gives it a title, just in case the user happens to see it (although typically it runs before Explorer loads, and even then it’s usually minimized). Immediately after, it makes sure it’s in the C Drive and changes to the Windows\System32 folder and uses an IF EXIST to see if a file named gde_installed is present. If it is, it uses a GOTO to skip the installation and end the batch job.
If gde_installed isn’t in the system32 folder, it maps \publicinstalls (the globally-available share) to the X Drive, which isn’t used in our organization. It then changes to X:, runs the GDS installer with the /force and /silent flags to install it unattendedly, then it disconnects the X: drive so the users won’t see it, and creates the gde_installed file in the system32 folder.
Details
In the batch file, you’ll note the use of >nul. This simply directs console output into nothingness so the command window, if seen, only shows what I have ECHO‘ed to it. You’ll also notice that the GoogleDesktopSetup.exe program is executed using start /wait. This forces the batch process to wait for the installation to finish before moving on. Without it, it will try to disconnect the X: drive too soon, which will it to prompt the user to forcefully disconnect the drive. As this is a fully automated process, and console output is sent to nul, we don’t want this to happen, hense the /wait flag.