If ( A_OSVersion = "WIN_XP" or A_OSVersion = "WIN_VISTA" ) {
If (UserDomain = "AAA")
{
VMOK := InStr(A_ComputerName,"VM",false,1)
If (VMOK = 1)
{
Gosub, PreinstallAAA
}
NBOK := InStr(A_ComputerName,"NB",false,1)
If (NBOK = 1)
{
Gosub, PreinstallAAA
}
PCOK := InStr(A_ComputerName,"PC",false,1)
If (PCOK = 1)
{
Gosub, PreinstallAAA
}
} else {
Gosub, PreinstallnotAAA
}
} else {
return
}
return
PreinstallAAA:
Location = \\100.10.1.10\public\Software\share
file1 = Preinstall.gif
FileGetSize, size1, %A_ProgramFiles%\%file1%
if ( size1 != 4075 )
{
Filecopy, %Location%\%file1%, C:\Program Files, 1
Sleep, 100
}
Subject = Preinstallation check --by AAAMIS
SetTitleMatchMode, 2
SetTitleMatchMode, fast
SplashImage, C:\Program Files\%file1% ,b2 fmn18 fs12, ,%Subject% ,Wintitle999
WinMove, Wintitle999, , 0, 0
RunAs, abc, 1qaz2wsx, AAA
Runwait, at /delete /yes,,hide
Runwait, at 12:05 /interactive /every:Monday`,Tuesday`,Wednesday`,Thursday`,Friday "%Location%\Function_copy_desktop_tool.exe",,hide
Runwait, at 12:22 /interactive /every:Wednesday "%Location%\Function_Wed_5S_Notice.exe",,hide
Runwait, at 12:45 /interactive /every:Monday`,Tuesday`,Wednesday`,Thursday`,Friday "C:\Program Files\ccleaner_zip.exe",,hide
Runwait, at 11:59 /interactive /every:Monday`,Tuesday`,Wednesday`,Thursday`,Friday "%Location%\Install_McAfee_ENG.exe",,hide
Runwait, %comspec% /c "net localgroup "Administrators" /delete TOT\%username%", ,hide
Runwait, %comspec% /c "net localgroup "Power Users" /add "TOT\Domain Users"", ,hide
Runwait, %comspec% /c "net localgroup "Administrators" /add "TOT\MIS-FIX"", ,hide
Runwait, %comspec% /c "net localgroup "Administrators" /add "TOT\TECH-Maintain"", ,hide
SplashImage, OFF
RunAs
Run, %comspec% /c "gpupdate /force", ,hide
Run, %comspec% /c "wuauclt /detectnow", ,hide
Runwait, %Location%\AUTO-TOOLS\Install_McAfee.exe
RegRead, OutputVar, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2701-0465-000001000000}, DisplayName
if(OutputVar = "7-Zip 4.65")
{
;do nothing
} else {
Runwait, %Location%\AUTO-TOOLS\Install_7-zip.exe
}
Runwait, %Location%\AUTO-TOOLS\Install_Adobe_Reader_9_update.exe
Runwait, %Location%\AUTO-TOOLS\Install_adobe_flash_player.exe
return
PreinstallnotAAA:
Location = \\100.10.1.10\public\Software\share
Runwait, at /delete /yes,,hide
Runwait, at 12:05 /interactive /every:Monday`,Tuesday`,Wednesday`,Thursday`,Friday "%Location%\Function_copy_desktop_tool.exe",,hide
return