Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
aim silent remote install
### report:
$Computers = Get-ADComputer -SearchBase "OU=Workstations,DC=contoso,DC=corp" -Filter {(enabled -eq "true")} | select name -ExpandProperty name
$aimversionlist = @()
foreach ($computer in $computers ) {
write-host $computer
$tempobj = "" | select computer, aimversion
$tempobj.computer = $computer
if (fastping $computer ) {
try{
$file = "\\$computer\c$\Program Files (x86)\AIM\aim.exe"
$tempobj.aimversion = $([System.Diagnostics.FileVersionInfo]::GetVersionInfo($file).FileVersion)
} catch {
$tempobj.aimversion = "not installed"
}
} else {
$tempobj.aimversion = "unreachable via ping"
}
$aimversionlist += $tempobj
}
# http://www.itninja.com/question/unattended-aim-installation
# http://www.itninja.com/software/america-online/aol-instant-messenger/7-1582
#copy files to "\\nysana\installerables\AIM\7_5_21_5_Installer" from %temp% when manually running the AIM installer (just open it without progressing)
#also copy taskkill.exe from c:\windows\system32\taskkill.exe to our fake CIFS share "\\nysana\installerables\AIM\7_5_21_5_Installer"
#replace the setup.ini file as noted in the above links:
#[SEARCH]
#ID=search
#InstSrc=postproc.exe
#InstParams=
#InstTimeout=900
#InstProgTimeout=900
#InstTime=1
#Selectable=n
#checked=n
#StatId=I2E2
#SelectProd=This was the section to set AOL Search now just runs postproc (which does nothing)
#NoFail=Y
#ExitCode=0
#
#[HOMEPAGE]
#ID=homepg
#InstSrc=postproc.exe
#InstParams=
#InstTimeout=900
#InstProgTimeout=900
#InstTime=1
#Selectable=n
#checked=n
#StatId=I2E3
#SelectProd=This was the section to set home page now just runs postproc (which does nothing). you could change instsrc back to bsetutil and instparm to: -target default -homepage http://cnn.com though for example
#NoFail=Y
#ExitCode=0
#
#[IETOOLBAR]
#ID=ietb
#SysSize=2400
#OS=XP,XP64,+
#InstSrc=taskkill.exe
#InstParams=/im setup.exe /f
#Selectable=n
#checked=n
#StatId=I2E1
#SelectProd=Install AIM Toolbar
#InstTime=1
#ExitCode=0
#NoFail=Y
##deploy process
foreach ($computer in $computers ) {
write-host "starting on $computer" -backgroundcolor green
#copy the installer locally
mkdir \\$computer\C$\kits | out-null
write-host "copying from kits to on kits on $computer" -backgroundcolor green
copy "\\nysana\installerables\AIM\7_5_21_5_Installer" \\$computer\C$\kits -recurse -force
#start install
invoke-command {
write-host "inside $env:computer" -backgroundcolor green
write-host "killing aim.exe" -backgroundcolor green
#kill aim.exe (may not be necessary)
stop-process -name "aim" -force
write-host "starting installer" -backgroundcolor green
cmd /c C:\kits\75installer\setup.exe
write-host "installer finished" -backgroundcolor green
} -computername $computer
}
#remember to audit again when "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment