iTunes, GPOs, and a migraine.

Jayce

Fully Optimized
Messages
3,056
Location
/home/jason
Hello friends. I'm trying to install iTunes via a batch script that runs on startup through group policy. The skinny is this. I have already deployed iTunes 11.0 through the individual MSI files along with their MST's through a GPO with a batch script. The actual iTunes.exe is a series of MSI's bundled up. It seems as if iTunes is picky about them installing in order, so it made sense (and Google research confirmed) that the batch file was the best way to go. As I said what I'm aiming to do is upgrade 11.0 to 11.1.4 in one swoop.

Now I can easily run the batch script to install iTunes 11.1.4. But my concern is I don't want it running every time on startup and thereby reinstalling iTunes 11.1.4 over and over. Is there a way I can pass a command to check the version, and if it doesn't match 11.1.4, then install? But if it matches 11.1.4, simply ignore it?

A source I just pulled up suggested:

Have the script check for the existence of a reg key or dummy text file. If it exists, do not run. If it doesn't exist, then run.

So trying to piece this together, I'm understanding this is what I need to do:

Push iTunes 11.1.4 as per startup batch file to all systems. In the process, write a reg key file. Afterwards for future upgrades, change the reg key with each version. That way if the startup script sees the reg key for 11.1.4, and it has 11.1.4 installed, it bypasses it - but if 11.1.5 comes out, it won't see that reg key, so it'll execute accordingly... and then repeat for 11.1.6 etc.

If that's the case, what is entailed with creating a reg key and passing it with each version consistently? How is it referenced within the batch file itself?

Thanks for any and all help!
 
I assume the iTunes installers are on a network share somewhere?

You could configure a "one-time" scheduled task as a GPO, and tell it to run your script as "you" (unless everyone has access to that network share). Configure an Immediate Task Item (At least Windows 7)

Create an immediate task, and check "apply once and do not reapply" in the common options.

Apply once and do not reapply

Preference items are applied when Group Policy refreshes.

  • By default, the results of preference items are rewritten each time Group Policy refreshes. This ensures that the results of the preference items are consistent with what the administrator designated in the Group Policy object.
  • If the Apply once and do not reapply option is selected, it changes this behavior, so the preference extension applies the results of the preference item to the user or computer only once. This option is useful when you do not want the results of a preference item to reapply.
If I had no time on my hands, I'd go all-out with scripting this (most likely with powershell).
 
Last edited:
Back
Top Bottom