Got this working by creating an SCCM 2007 package that has two programs. Program 1 calls a runs VB and runs with the users permissions only when the user is logged in. Program 2 calls a CMD that in turn runs a VB script and runs with administrative permissions. The advertisment is set to download.
Program 1 VB Script: (note: i push an environment variable to my machine named smssource that points to the nas path I have all of our package source files in)
Set oShell = createobject ("wscript.shell")
Set oFSO = createobject ("scripting.filesystemobject")
Set oEnv = oShell.environment ("process")
'This creates c:\users\<userprofile>\appdata\locallow\apple computer if it doesn't already exist
If Not oFSO.FolderExists (oEnv("UserProfile") & "\AppData\LocalLow\Apple Computer\") Then
strNewfolder = oFSO.CreateFolder (oEnv("UserProfile") & "\AppData\LocalLow\Apple Computer\")
End If
'This creates 'This creates c:\users\<userprofile>\appdata\locallow\apple computer if it doesn't already exist if it doesn't already exist
If Not oFSO.FolderExists (oEnv("UserProfile") & "\AppData\LocalLow\Apple Computer\QuickTime\") Then
strNewfolder = oFSO.CreateFolder (oEnv("UserProfile") & "\AppData\LocalLow\Apple Computer\QuickTime\")
End If
'This copies the customized quicktime preference file to c:\users\<userprofile>\appdata\locallow\apple computer\quicktime
oFSO.CopyFile oEnv("smssource") &"\Apple\QuickTime\QuickTime.qtp", oEnv("UserProfile") &"\AppData\LocalLow\Apple Computer\QuickTime\",True
Program 2 CMD:
Pushd %~dp0
Wscript.exe install.vbs
Install.vbs:
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Apple = "C:\Windows\System32\Tasks\Apple"
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
strStringValueName = "QuickTime Task"
Set oShell = createobject ("wscript.shell")
Set oFSO = createobject ("scripting.filesystemobject")
Set oEnv = oShell.environment ("process")
Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
oShell.Run "msiexec.exe /i AppleApplicationSupport.msi /qn", ,True
oShell.Run "msiexec.exe /i quicktime.msi /qn ASUWISINSTALLED=0 DESKTOP_SHORTCUTs=NO QT_TRAY_ICON=NO SCHEDULE_ASUW=NO /l* c:\windows\options\sccm\QuickTime7.71.80.42.log", ,True
'Apple creates a job for Task Scheduler for auto updates this deletes that task
If oFSO.FolderExists(Apple) Then
oFSO.DeleteFolder Apple
End If
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strStringValueName
Wscript.Quit