code:
? color c+/n "KiXtart "color w/n"is version " color w+/n @kix color w/n
? color y+/n "Determining Area Office and User..." color w/n gosub AreaOffice
? color y+/n "Setting Common Variable Values..." color w/n gosub Variables
? color y+/n "Determining Computer Hardware..." color w/n gosub Hardware
? color y+/n "Determining OS on Computer..." color w/n gosub OperatingSystem
? color y+/n "Determining Local Admin Privilege..." color w/n gosub LocalAdmin
? color y+/n "Setting Network Policies based on Groups..." color w/n gosub GroupPolicy
? color y+/n "Mapping Drives based on Groups..." color w/n gosub GroupDrives
? color y+/n "Installing Applications based on Groups..." color w/n gosub GroupApps
? color y+/n "Updating Applications..." color w/n gosub UpdateApps
? color y+/n "Performing Hardware and Software Inventory..." color w/n gosub Inventory
? color y+/n "Mapping Area Office Drives..." color w/n Call "$logon\AreaDrives.kix"
? color y+/n "Running Custom Area Office scripts..." color w/n Call "$logon\AreaScript.kix"
? color g+/n "Logon Script is Complete." color w/n ?EXIT
;*********************************** END OF LOGON SCRIPT, Returning to Logon.bat *********************************
;*****************************************************************************************************************
;*****************************************************************************************************************
;****************************************** START OF SUBROUTINES *************************************************
;*****************************************************************************************************************
;*****************************************************************************************************************
;***************************************** start of Area Office **************************************************
:AreaOffice
select
case ingroup("fdhc\area01") $area="01" $dcsa="zdnhz"
case ingroup("fdhc\area02") $area="02" $dcsa="zgfnhZDs"
case ingroup("fdhc\area03") $area="03" $dcsa="tjaaetj"
case ingroup("fdhc\area04") $area="04" $dcsa="aetjzd"
case ingroup("fdhc\area05") $area="05" $dcsa="zdthza"
case ingroup("fdhc\area06") $area="06" $dcsa="zsdetjhade"
case ingroup("fdhc\area07") $area="07" $dcsa="etjhdet"
case ingroup("fdhc\area08") $area="08" $dcsa="edthjde"
case ingroup("fdhc\area09") $area="09" $dcsa="zsdhzdg"
case ingroup("fdhc\area10") $area="10" $dcsa="zdgjng"
case ingroup("fdhc\area11") $area="11" $dcsa="dgtnhjzsdet"
case @userid<>"administrator"
$mess="Ask your DCSA to add you to your Area global group. Your logonscript will not run"
messagebox("$mess","Message from MIS", 1)
$text="@userid does not belong to an area group and logonscript for this person will not operate"
sendmessage("gnhdgt","$text @ipaddress0")
sendmessage("tjedtjh","$text @ipaddress0")
quit
endselect
$group ="area$area"
select
case ingroup($group+"med") $dept="Medicaid"
case ingroup($group+"mis") $dept="MIS"
case ingroup($group+"mqa") $dept="MQA"
case ingroup($group+"hqa") $dept="HQA"
case ingroup($group+"legal") $dept="Legal"
case ingroup($group+"OIG") $dept="OIG"
case ingroup($group+"pi") $dept="OIG"
case ingroup($group+"P&&C") $dept="P&C"
case ingroup($group+"plans") $dept="P&C"
case 1 $dept=""
; sendmessage("$dcsa","Cannot determine @userid group membership in $group")
endselect
$namesep=instr("@fullname",";")
if $namesep=0 sendmessage("$DCSA","@userid @fullname is not formatted correctly") endif
$positionnum=substr("@fullname",1,$namesep-1)
$longname=Ltrim(substr("@fullname",$namesep+1,len("@fullname")-$namesep))
? " Current user "color c+/n"$longname "color w/n "is a member of "color w+/n"Area" $area $dept color w/n
Return
;******************************************* end of AreaOffice ****************************************************
;******************************************************************************************************************
;******************************************* start of Variables ***************************************************
:Variables
$server="\\a$area"
$logon ="$server\logon"
$setup ="\\ada$area\setup$$"
$HKLMS ="HKEY_LOCAL_MACHINE\Software"
$HKCUS ="HKEY_CURRENT_USER\Software"
$HKCPCPD ="HKEY_CURRENT_USER\Control Panel\Desktop"
$HKLMHDS ="HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System"
$HKLMSCCS ="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet"
$HKCUSMWCV ="$HKCUS\Microsoft\Windows\CurrentVersion"
$HKLMSMWCV ="$HKLMS\Microsoft\Windows\CurrentVersion"
$HKLMSMWNTCV ="$HKLMS\Microsoft\Windows NT\CurrentVersion"
$HKCUSMWNTCV ="$HKCUS\Microsoft\Windows NT\CurrentVersion"
$McAfeeRegKey="$HKLMS\McAfee\VirusScan"
$McAfeeEngKey="$McAfeeRegKey\Tasks\Upgrade"
$HKLMSMVSDT ="$McAfeeRegKey\VirusScan\McShield\CurrentVersion"
$McAfeeAltKey="$HKLMS\McAfee\AlertManager\Recipients"
$prd =readvalue("$McAfeeRegKey", "szProductVer")
$eng =readvalue("$McAfeeRegKey", "szEngineVer")
$dat =readvalue("$McAfeeRegKey", "szVirDefVer")
$Mcdate =readvalue("$McAfeeRegKey", "szVirDefDate")
$mceng =readvalue("$McAfeeEngKey", "szUpgradeCMD")
$mcexe =readvalue("$McAfeeRegKey", "szUpdateEXE")
$datdir =readvalue("$McAfeeRegKey", "DAT")
$scanner =readvalue("$McAfeeRegKey", "scan32exe")
$exts =readvalue("$HKLMSMVSDT" , "szProgExts")
$desktop =readvalue("$HKCUSMWCV\Explorer\Shell Folders","Desktop")
$startmenu =readvalue("$HKCUSMWCV\Explorer\Shell Folders","Start Menu")
$favorites =readvalue("$HKCUSMWCV\Explorer\Shell Folders","Favorites")
$alldesktop =readvalue("$HKLMSMWCV\Explorer\User Shell Folders","Common Desktop")
$allstartmenu=readvalue("$HKLMSMWCV\Explorer\User Shell Folders","Common Start Menu")
$SubVer =ReadValue("$HKLMSMWCV","SubVersionNumber")
$SvcPack =ReadValue("$HKLMSMWNTCV", "CSDVersion")
$ProdType =ReadValue("$HKLMSCCS\Control\ProductOptions","ProductType")
$MisMsg ="You computer needs a software update that will take about"
$MisMsg1="Do you wish to install it at this time?"
$MisMsg2="The update will now begin. Do not touch anything until the computer restarts on its own"
$MisMsg3="The update will now begin. Do not touch anything until the update finishes"
$spcurrent="Service Pack 6"
$O8current="8.0.5.0.0"
$iecurrent="5.00.2314.1003"
$arcurrent="4.05"
$McEngine ="4.1.40"
$QPcurrent="3.2.0.10"
$esr="" $asr="" $psr="" $impver="" $oraver="" $Winzipver=""
$Biosv="" $Biosd="" $Make="" $Model="" $SerNo="" $Case=""
$CPUfm="" $CPUsp="" $dimm1="" $dimm2="" $dimm3="" $memory=""
$c=chr(44) $modem="" $owner="" $admin=0 $asefiletime="" $does="does not"
return
;******************************************* end of Variables *****************************************************
;******************************************************************************************************************
;******************************************* start of OperatingSystem *********************************************
:OperatingSystem
select
Case @inwin=1 and $ProdType="WinNT" and @dos="5.0"
$os="Win2k" $ostype="WinNT" $ossubver="$svcpack"
Case @inwin=1 and $ProdType="WinNT"
$os="WinNT" $ostype="WinNT" $ossubver="$svcpack"
Case @inwin=2 and @dos="4.90"
$os="WinME" $ostype="Win95" $ossubver="$subver"
Case @inwin=2 and @dos="4.10"
$os="Win98" $ostype="Win95" $ossubver="$subver"
Case @inwin=2 and @dos="4.0"
$os="Win95" $ostype="Win95" $ossubver="$subver"
Case 1
$os="undetermined" $ostype="undetermined" $ossubver="undetermined"
endselect
? " Installed "color c+/n "Operating System " color w/n "is " color w+/n $os color w/n
? " Installed "color c+/n "Service Pack " color w/n"is version "color w+/n $ossubver color w/n
return
;******************************************* end of OperatingSystem ******************************************************
;*************************************************************************************************************************
;******************************************** start of Hardware *********************************************************
:Hardware
if @ras=0 and exist("c:\smbios.exe")=0
copy "$logon\smbios.exe" "c:\"
endif
go c:
cd "c:\"
del "c:\hardware.lst"
shell "%comspec% /c c:\smbios.exe >nul"
sleep 1
$Biosv=readprofilestring("c:\hardware.lst","Bios","Version")
$biosd=readprofilestring("c:\hardware.lst","Bios","Date")
$Make =readprofilestring("c:\hardware.lst","System","Make")
$Model=readprofilestring("c:\hardware.lst","System","Model")
$SerNo=readprofilestring("c:\hardware.lst","System","Serial#")
$Case =readprofilestring("c:\hardware.lst","Case","Type")
$CPUfm=readprofilestring("c:\hardware.lst","Processor-4","Family")
$CPUsp=readprofilestring("c:\hardware.lst","Processor-4","CurSpeed")
if $CPUfm=""
$CPUfm=readprofilestring("c:\hardware.lst","Processor-400","Family")
$CPUsp=readprofilestring("c:\hardware.lst","Processor-400","CurSpeed")
endif
select
case $model="Inspiron 7500"
$SerNo=readprofilestring("c:\hardware.lst","Case","Serial#")
$SerNo=substr("$SerNo",1,5)
$dimm1=readprofilestring("c:\hardware.lst","MemDev26","Size")
$dimm2=readprofilestring("c:\hardware.lst","MemDev27","Size")
$memory=val("$dimm1")+val("$dimm2")
case $make="Dell Computer Corporation"
$dimm1=readprofilestring("c:\hardware.lst","MemDev4352","Size")
$dimm2=readprofilestring("c:\hardware.lst","MemDev4353","Size")
$memory=val("$dimm1")+val("$dimm2")
case $make="Compaq" and $Biosv="686J1 v1.10"
$CPUfm=readprofilestring("c:\hardware.lst","Processor-5","Family")
$CPUsp=readprofilestring("c:\hardware.lst","Processor-5","CurSpeed")
$dimm1=readprofilestring("c:\hardware.lst","MemDev30","Size")
$dimm2=readprofilestring("c:\hardware.lst","MemDev31","Size")
$memory=val("$dimm1")+val("$dimm2")
case $make="Compaq"
$dimm1=readprofilestring("c:\hardware.lst","MemDev35","Size")
$dimm2=readprofilestring("c:\hardware.lst","MemDev36","Size")
$dimm3=readprofilestring("c:\hardware.lst","MemDev37","Size")
$memory=val("$dimm1")+val("$dimm2")+val("$dimm3")
endselect
$freespace=getdiskspace("C:\")
? " Computer "color c+/n "Manufacturer " color w/n "is " color w+/n $Make color w/n
? " Computer "color c+/n "Model " color w/n "is " color w+/n $Model color w/n
? " Computer "color c+/n "Bios " color w/n "is " color w+/n $Biosv color w/n " dated " color w+/n $Biosd color w/n
? " Computer "color c+/n "Serial Number " color w/n "is " color w+/n $SerNo color w/n
? " Computer "color c+/n "Processor " color w/n "is a " color w+/n $CPUfm color w/n " running at " color w+/n $CPUsp color w/n
? " Computer "color c+/n "Memory " color w/n "is " color w+/n $memory " MB" color w/n
return
;********************************************* end of Hardware ***********************************************************
;*************************************************************************************************************************
;******************************************* start of LocalAdmin *********************************************************
:LocalAdmin
if $ostype="WinNT"and ingroup("\\@wksta\Administrators")>0
$owner=@userid $admin=1 $does="does"
endif
? " @userid " color c+/n $does color w/n " have Local Admin privileges on " color w+/n"@wksta" color w/n
return
;******************************************* end of LocalAdmin ***********************************************************
;*************************************************************************************************************************
;******************************************* start of GroupPolicy ********************************************************
:GroupPolicy
if $os="Win2k" and $admin=1
;? " Disable browsemaster for win2k machines"
$MSL=ReadValue("$HKLMSCCS\Services\Browser\Parameters","MaintainServerList")
if $MSL="auto"
$=WriteValue("$HKLMSCCS\Services\Browser\Parameters","MaintainServerList","no",REG_SZ)
endif
;? " Synchronizing "color c+/n"System Time "color w/n"with Server " color w+/n "$server" color w/n
settime "$server"
;? " Applying Server comment"
$=writevalue("$HKLMSCCS\Services\LanmanServer\Parameters","srvcomment", "Win2k $group @fullname",REG_SZ)
; ? " install Elron "
if exist ("@lanroot\elronuam.dll")=0 and @ras=0
run "$logon\elron\uam_168_82_56_108_53_N.exe"
$=Writeprofilestring("$server\logon\inventory\Install.log","Elron","@wksta","@date")
endif
endif
if $os="WinNT" and $admin=1
;? " Maintaining Administration of Workstation"
$admincmd="cmd /c NET LOCALGROUP administrators fdhc\"+$group+"mis /add 1>Nul 2>&1"
shell "$admincmd"
;? " Synchronizing "color c+/n"System Time "color w/n"with Server " color w+/n "$server" color w/n
settime "$server"
;? " Applying "color c+/n"mm/dd/yyyy "color w/n"date setting"
$=WRITEVALUE("HKEY_CURRENT_USER\Control Panel\International","sShortDate","MM/dd/yyyy",REG_SZ)
;? " Applying Server comment"
$=writevalue("$HKLMSCCS\Services\LanmanServer\Parameters","srvcomment", "$group @fullname",REG_SZ)
;? " Verify and Clear DNS settings if DHCP Client indicated by value of 2"
$dhcpservice=readvalue("$HKLMSCCS\services\dhcp","start")
if $dhcpservice="2"
$dnsserver=readvalue("$HKLMSCCS\services\tcpip\parameters","NameServer")
if $dnsserver>" "
$=writevalue("$HKLMSCCS\services\tcpip\parameters","NameServer","",REG_SZ)
endif
endif
;? " Configure and enforce Proxy settings"
$ProxyServer="proxy.fdhc.state.fl.us:8080"
$LMIntSettings="$HKLMSMWCV\Internet Settings"
$CUIntSettings="$HKCUSMWCV\Internet Settings"
; $pbd=readvalue("$HKCUS\Policies\Microsoft\Internet Explorer\Control Panel","Proxy")
$psv=readvalue("$CUIntSettings","ProxyServer")
$pmv=readvalue("$LMIntSettings","ProxyServer")
if $psv<>"$ProxyServer" or $pmv<>"$ProxyServer"
$=writevalue("$LMIntSettings","ProxySettingsPerUser","0",REG_DWORD)
$=writevalue("$LMIntSettings","ProxyServer","$ProxyServer",REG_SZ)
$=writevalue("$LMIntSettings","ProxyEnable","1",REG_DWORD)
$=writevalue("$LMIntSettings","ProxyOverride","<local>",REG_SZ)
$=writevalue("$CUIntSettings","ProxySettingsPerUser","0",REG_DWORD)
$=writevalue("$CUIntSettings","ProxyServer","$ProxyServer",REG_SZ)
$=writevalue("$CUIntSettings","ProxyEnable","1",REG_DWORD)
$=writevalue("$CUIntSettings","ProxyOverride","<local>",REG_SZ)
$=writevalue("$HKCUS\Microsoft\Internet Explorer\Main","NoUpdateCheck","1",REG_DWORD)
$=writevalue("$HKCUS\Policies\Microsoft\Internet Explorer\Control Panel","Proxy","1",REG_DWORD)
endif
; ? " check for napster"
if existkey("$HKLMS\napster")=0
$napdir=readvalue("$HKLMS\napster","InstallPath")
$=sendmessage("$dcsa","Napster is detected on @wksta")
$=Writeprofilestring("$logon\inventory\UnInstall.log","Napster","@wksta","@date")
shell("%comspec% /c %windir%\unvise32.exe /s $napdir\uninstal.log")
endif
; ? " Disable Autodial"
$rasauto="$HKLMSCCS\Services\RasAuto"
$autovalue=readvalue("$rasauto","Start")
if @error=0 and $autovalue<>3
$=writevalue("$rasauto","Start","3",REG_DWORD)
endif
; ? " Standard RAS Phonebook "
if exist("c:\Program Files\IBM Global Network\IDialer.exe")=0 and exist("c:\Program Files\AT&T Global Network\IDialer.exe")=0
$rasdir="%windir%\system32\ras"
$phonedate=comparefiletimes("$logon\rasphone.tag","$rasdir\rasphone.tag")
$modemkey=readvalue("$HKLMS\Microsoft\RAS\TAPI DEVICES\Unimodem","Friendly Name")
$modem=substr("$modemkey",1,instr("$modemkey","|")-1)
if instr("$modem","Serial Cable")>0
$modem=""
endif
if ($phonedate=1 or $phonedate=-3) and $modem>""
copy "$logon\rasphone.pbk" "$rasdir"
copy "$logon\rasphone.tag" "$rasdir"
$=writeprofilestring("$rasdir\rasphone.pbk","Tallahassee Local","Device","$modem")
$=writeprofilestring("$rasdir\rasphone.pbk","AHCA SunCom","Device","$modem")
$=writeprofilestring("$rasdir\rasphone.pbk","AHCA Toll Free","Device","$modem")
$hklmsmwcv="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion"
$namespace="Explorer\Desktop\NameSpace"
$clsid="{a4d92740-67cd-11cf-96f2-00aa00a11dd9}"
$=writevalue("HKEY_CLASSES_ROOT\CLSID\$clsid","","AHCA Dialup","REG_SZ")
$=addkey("$hklmsmwcv\$namespace\$clsid")
$=writevalue("$hklmsmwcv\$namespace\$clsid","","AHCA Dialup","REG_SZ")
endif
endif
;? " Connect H & S Drives for RAS Users"
$rasdir="%windir%\system32\ras"
if exist("$rasdir\rasphone.pbk")
$rasdrivesdate=comparefiletimes("$logon\rasdrives.kix","$rasdir\rasdrives.kix")
if $rasdrivesdate=1 or $rasdrivesdate=-3
shell "xcopy $logon\rasdrives.* $rasdir /q"
$clkey="HKEY_CLASSES_ROOT\CLSID"
$clsid="{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}"
$clnam="Connect H & S Drives"
$clico="$rasdir\rasdrives.ico"
$clcmd="$rasdir\rasdrives.cmd"
$=addkey("$clkey\$clsid")
$=addkey("$clkey\$clsid\DefaultIcon")
$=addkey("$clkey\$clsid\InProcServer32")
$=addkey("$clkey\$clsid\Shell")
$=addkey("$clkey\$clsid\Shell\Connect")
$=addkey("$clkey\$clsid\Shell\Connect\Command")
$=addkey("$clkey\$clsid\ShellEx")
$=addkey("$clkey\$clsid\ShellEx\PropertySheetHandlers")
$=addkey("$clkey\$clsid\ShellEx\PropertySheetHandlers\$clsid")
$=addkey("$clkey\$clsid\ShellEx\ShellFolder")
$=writevalue("$clkey\$clsid","","$clnam","REG_SZ")
$=writevalue("$clkey\$clsid\DefaultIcon","","$clico","REG_SZ")
$=writevalue("$clkey\$clsid\InProcServer32","","shell32.dll","REG_SZ")
$=writevalue("$clkey\$clsid\InProcServer32","ThreadingModel","Apartment","REG_SZ")
$=writevalue("$clkey\$clsid\Shell\Connect\Command","","$clcmd","REG_SZ")
$=writevalue("$clkey\$clsid\ShellFolder","Attributes","0","REG_DWORD")
; ************ Creates the desktop icon ************************
? " Setting Connect H & S Desktop Icon"
$=addkey("$HKLMSMWCV\Explorer\Desktop\NameSpace\$clsid")
endif
endif
; ? " install Elron "
if exist ("@lanroot\elronuam.dll")=0 and @ras=0
run "$logon\elron\uam_168_82_56_108_53_N.exe"
$=Writeprofilestring("$logon\inventory\Install.log","Elron","@wksta","@date")
endif
endif
if $os="Win2k"
;? " Applying "color c+/n"Internet Home Page "color w/n"setting"
$=writevalue("$HKCUS\Microsoft\Internet Explorer\main","start page","http://ahcaweb/","REG_SZ")
endif
if $os="WinNT"
;? " Applying "color c+/n"Internet Home Page "color w/n"setting"
$=writevalue("$HKCUS\Microsoft\Internet Explorer\main","start page","http://ahcaweb/","REG_SZ")
;? " Invalidate shortcuts"
$=writevalue("$HKCUSMWCV\Policies\Explorer","LinkResolveIgnoreLinkInfo","1","REG_SZ")
$=writevalue("$HKCUSMWCV\Policies\system","NoDispScrSavPage","0",REG_SZ)
if ingroup("Area_Fraes")=1
if existkey("$HKLMSMWCV\Uninstall\Webshots")=0
$remove=readvalue("$HKLMSMWCV\Uninstall\Webshots","UninstallString")
shell("$remove")
$=Writeprofilestring("$logon\inventory\Uninstall.log","WebShots","@wksta","@date")
endif
;Set default screensaver with 5 minute time out
$=writevalue("$HKCPCPD","ScreenSaveActive","1","REG_SZ")
$=writevalue("$HKCPCPD","ScreenSaverIsSecure","1","REG_SZ")
$=writevalue("$HKCPCPD","ScreenSaveTimeOut","300","REG_SZ")
$=writevalue("$HKCPCPD","ScrnSave.exe","%windir%\System32\Logon.scr","REG_SZ")
$=writevalue("$HKCUSMWCV\Policies\system","NoDispScrSavPage","1",REG_SZ)
endif
endif
return
;******************************************* end of GroupPolicy **********************************************************
;*************************************************************************************************************************
;******************************************* start of GroupDrives ********************************************************
:GroupDrives
shell "%comspec% /c net use * /delete /y 1>Nul 2>&1"
if ingroup("Areamis")
use f: "$server\e$$"
use Y: "\\ITSS\itss"
? color c+/n " MIS Global Group" color w/n " drives " color w+/n "F: Y:" color w/n
endif
if ingroup("MCHQ_RN")
use m: "\\c1dm3\QOCMonitors"
? color c+/n " QOC Global Group" color w/n " drives " color w+/n "M:" color w/n
endif
if ingroup("Compass")
use i: "\\fdhctlh10\Flstatutes"
? color c+/n " Compass Global Group" color w/n " drives " color w+/n "I:" color w/n
endif
if ingroup("Area_Impromptu")
use e: "\\FDHCTLH13\CAU"
use g: "\\c1dm3\INSP_HQA"
use z: "\\FDHCTLH13\MISAPPS"
? color c+/n " Impromptu Global Group" color w/n " drives " color w+/n "E: G: Z:" color w/n
endif
if ingroup("Area_DMS")
use m: "\\c1dm3\dma$area"
? color c+/n " Disease Management Global Group" color w/n " drives " color w+/n "M:" color w/n
endif
if ingroup("Area_HMO")
use n: "\\c1dm3\hmo"
? color c+/n " HMO WC&C Unit Nurses Global Group" color w/n " drives " color w+/n "N:" color w/n
endif
if ingroup("Area_legal")
use l: "\\itss\pmwin" ; L & M are required for Practice Manager
use m: "\\c1dm3\pmwin"
use t: "\\mad\westpub" ; T & U are required for Premise/Westpub
use u: "\\oagcdwins\ahcce1$$"
use q: "\\fdhctlh10\cch" ; Q, R, & W are required for CCH
use r: "\\fdhctlh10\cchkar02"
use w: "\\fdhctlh10\cchkar03"
use v: "\\mad\shepards" ; V is required for Shepards
? color c+/n " Legal Group"color w/n " drives "color w+/n "Q: R: T: U: V: W:"color w/n
endif
if ingroup("Area_FireSafety") ; MCHQ Fire Safety Surveyors
use f: "\\fdhctlh10\nfc"
? color c+/n " Fire Safety Group"color w/n " drives "color w+/n "F:"color w/n
endif
if ingroup("Area_OIG")
use f: "\\c1dm3\mpi_shared"
use k: "\\c1dm3\adhoc_req"
? color c+/n " OIG Group"color w/n " drives "color w+/n "E: F: K:"color w/n
endif
if ingroup("mpd-area")
use t: "\\c1dm3\mpd_shared"
? color c+/n " Medicaid Field Ops"color w/n " drives "color w+/n "T:"color w/n
endif
if ingroup("mchq_reports") or ingroup("ltcqa")
use k: "\\c1dm3\adminacts"
? color c+/n " MCHQ Reports & Database"color w/n " drives "color w+/n "K:"color w/n
endif
Return
;******************************************* end of GroupDrives **********************************************************
;*************************************************************************************************************************
;******************************************* start of GroupApps **********************************************************
:GroupApps
if @ras=0 and $admin=1 ;Do not run section if dialed up or not local admin on N
; ****************************** FL Legal Research Tools *****************************************
if ingroup("compass")
use i: "\\fdhctlh10\Flstatutes"
if exist("C:\FLTOOLS\BVIEWS.EXE")=0
? " Installing Florida Statutes program"
$Button=Messagebox("The new FL Legal Research Tools are now being installed", "Message from MIS",0)
$Button=Messagebox("You will be required to answer a couple of option windows", "Message from MIS",0)
$Button=Messagebox("Click OK on every option window", "Message from MIS",0)
$Button=Messagebox("The install will start as soon as you close this window", "Message from MIS",0)
shell "i:\comset"
sleep 20
$=Messagebox("Thank You", "Message from MIS",0)
copy "$startmenu\Programs\FL Legal Research Tools\*.*" "$Desktop"
endif
endif
; ******************************* Install Impromptu *********************************
$imp6bindir=readvalue("$HKLMS\Cognos\cer1\Rendition Locations","Programs")
$imp6path="$setup\Apps\impromptu6"
$inf32dir=enumvalue("HKEY_LOCAL_MACHINE\SOFTWARE\Informix\Setup\InstalledDirectories", 0)
if exist("c:\cognos")=1 and ingroup("$group"+"mis")=0 and exist("$inf32dir")=1
? " Removing Old Impromptu"
if exist("$server\hqa\home\@userid")
md "$server\hqa\home\@userid\Impromptu"
endif
copy "c:\cognos\bi96\workspce\*.imr" "$server\hqa\home\@userid\Impromptu"
if @error>0
? " Home dir not found, coping reports to temp folder on C: drive"
md "c:\imrtemp"
copy "c:\cognos\bi96\workspce\*.imr" "c:\imrtemp"
endif
shell "%comspec% /c rd /s /q c:\cognos"
$=delprogramgroup("Cognos",1)
del "$alldesktop\improm~2.lnk"
$=Writeprofilestring("$logon\inventory\unInstall.log","Impromptu","@wksta","@date")
endif
if ingroup("area_impromptu")=1 and exist("C:\Program Files\Cognos\cer1\bin\impuser.exe")=0 and exist("$imp6bindir")=0 and exist("$inf32dir")=1
? " Please wait for Impromptu 6 to install"
shell "%comspec% /c $imp6path\Cognos\Impromptu\xwsetup.exe /s $imp6path\Cognos\Impromptu\response.ini"
$imp6bindir=readvalue("$HKLMS\Cognos\cer1\Rendition Locations","Programs")
copy "$imp6path\impromptu.ini" "$imp6bindir"
copy "\\fdhctlh13\misapps\IMPT V6.0\TEMPLA~1\*.*" "C:\Program Files\Cognos\Cer1\bin\User Workspace"
copy "$startmenu\programs\Cognos~1\Cognos~1.lnk" "$desktop"
$=writevalue("$HKCUS\Informix\Environment","DBANSIWARN","n",REG_SZ)
$=writevalue("$HKCUS\Informix\Environment","DELIMIDENT","n",REG_SZ)
$=writevalue("$HKCUS\Informix\Environment","INFORMIXDIR","C:\informix",REG_SZ)
$=writevalue("$HKCUS\Informix\Environment","InformixServer","production",REG_SZ)
$=addkey("$HKCUS\Informix\netrc\ahcaprod")
$=writevalue("$HKCUS\Informix\netrc\ahcaprod","","",REG_SZ)
$=writevalue("$HKCUS\Informix\netrc\ahcaprod","AskPassword","P",REG_SZ)
$=writevalue("$HKCUS\Informix\netrc\ahcaprod","USER","@userid",REG_SZ)
$=addkey("$HKLMS\Informix\SqlHosts")
$=addkey("$HKLMS\Informix\SqlHosts\production")
$=writevalue("$HKLMS\Informix\SqlHosts\production","HOST","ahcaprod",REG_SZ)
$=writevalue("$HKLMS\Informix\SqlHosts\production","PROTOCOL","onsoctcp",REG_SZ)
$=writevalue("$HKLMS\Informix\SqlHosts\production","SERVICE","production",REG_SZ)
$=Writeprofilestring("$logon\inventory\Install.log","Impromptu6","@wksta","@date")
endif
if ingroup("area_impromptu")=0 and exist("$imp6bindir")=1 and ingroup("$group"+"mis")=0
? " UnInstalling imp6"
shell '"C:\Program Files\Common Files\Cognos Shared\cer1\Uninstall\uninst.exe" /u "C:\Program Files\Common Files\Cognos Shared\cer1\Uninstall\uninst.ini"'
$=Writeprofilestring("$logon\inventory\UnInstall.log","Impromptu6","@wksta","@date")
$=delprogramgroup("Cognos BI Silent",0)
$=del "$desktop\cognos~1.lnk"
endif
if ingroup("area_impromptu")=1 and exist("c:\program files\cognos\cer1\bin\impuser.exe")=1
? " Impromptu 6 ini files being copied"
shell 'xcopy "$imp6path\*.ini" "$imp6bindir" /r'
endif
; ************************* Install Metaframe *******************************
If ingroup("Area_MetaFrame")=1 and exist("C:\PROGRAM FILES\Citrix\ICA CLIENT\Uninst.isu")=0
? " Installing Citrix Metaframe"
Shell "$setup\apps\Metaframe\Setup.exe -s"
$=Writeprofilestring("$logon\inventory\Install.log","Metaframe","@wksta","@date")
sleep 20
endif
; ******************* Remove metaframe from unnecessary PCs ******************
If ingroup("Area_MetaFrame")=0 and exist("C:\PROGRAM FILES\Citrix\ICA CLIENT\Uninst.isu")=1 and Ingroup("areamis")=0
? " Uninstalling Citrix Metaframe"
$UnstKey=ReadValue("$HKLMSMWCV\Uninstall\Citrix ICA Client","UninstallString")
Shell "$UnstKey"
$=Writeprofilestring("$logon\inventory\UnInstall.log","Metaframe","@wksta","@date")
endif
; ************************* Install QueryPath *******************************
If ingroup("Area_QueryPath")=1
$QPexe="C:\Program Files\Consultec\QueryPath\Client.exe"
$QPins=getfileversion("$QPexe")
if exist("$QPexe")=1 and $QPins<>$QPcurrent
? " Uninstalling old version of Querypath"
Shell 'cmd /c C:\WINNT\uninst.exe -y -a -f"C:\Program Files\Consultec\QueryPath\DeIsL1.isu" -cC:\PROGRA~1\CONSUL~1\QUERYP~1\_ISREG32.DLL'
endif
if exist("$QPexe")=0
? " Installing QueryPath"
Shell "\\lobster\software\QueryPath\Client\Setup.exe -s"
Shell "regedit /s \\lobster\software\QueryPath\Client\dcom.reg"
$=Writeprofilestring("$logon\inventory\Install.log","QueryPath","@wksta","@date")
$QPins=getfileversion("$QPexe")
endif
? " Installed "color c+/n"QueryPath "color w/n"is version " color w+/n $qpins color w/n
endif
; ********************** Install business Objects ****************************
If ingroup("Area_BusObjects")=1 and exist("C:\Program Files\Business Objects\BusinessObjects 5.0\Busobj.exe")=0
? " Installing Business Objects"
sendmessage("@userid","The Business Objects install will take about 15-20 minutes")
Shell "\\lobster\software\BusObj5\setup\setup.exe -s -skip -key BJ2R-D6RMG-GPKG -rdbmskey H62N-D67U6-PU95"
$=Writeprofilestring("$logon\inventory\Install.log","BusinessObjects","@wksta","@date")
copy "\\lobster\software\BusObj5\security\*.*" "C:\Program Files\Business Objects\BusinessObjects 5.0\LocData"
copy "C:\WINNT\Profiles\All Users\Start Menu\Programs\BusinessObjects 5.0\busine~1.lnk" "$Desktop"
del "C:\Program Files\Business Objects\BusinessObjects 5.0\Universe\*.unv"
del "C:\Program Files\Business Objects\demo\*.*"
endif
; ********************** Install Oracle ****************************
If ingroup("Area_BusObjects") or ingroup("$group"+"cts")
$Orapath="$setup\clients\Oracle8"
$ora=readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE","ORACLE_HOME")
$oraver=getfileversion("$ora"+"\bin\n8sw.exe")
? " Oracle Version is "color y+/n"$oraver" color w/n
if $oraver<$O8current and exist("$Orapath\sms\cltappnt.bat")
? " Updating Oracle Client"
use v: "$setup"
go v:
cd "v:\clients\Oracle8\sms"
shell "cltappnt.bat"
$=Writeprofilestring("$logon\inventory\Install.log","Oracle","@wksta","@date")
endif
$ora=readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE","ORACLE_HOME")
$tnstime=comparefiletimes("$Orapath\tnsnames.ora","$ora\net80\admin\tnsnames.ora")
if $tnstime=1 or $tnstime=-3
copy "$Orapath\tnsnames.ora" "$ora\net80\admin"
? color g+/n" Updating Oracle Datasources"color w/n
endif
endif
endif
return
;******************************************* end of GroupApps ************************************************************
;*************************************************************************************************************************
;******************************************* start of UpdateApps *********************************************************
:UpdateApps
if @ras=0 ; Section will not run if dialed in
; **************************** Internet Explorer Section *************************************
$ier=readvalue("$HKLMS\Microsoft\Internet Explorer", "Version")
? " Installed "color c+/n"Internet Explorer"color w/n" is version "color w+/n $ier color w/n
$enc=readvalue("$HKLMSCCS\Control\SecurityProviders","Domestic Security Version")
If $Admin=1 and (@error>0 or $enc<"4.87")
shell "$setup\Apps\IE128bit\ie501dom.exe /R:N /Q:A /N:V"
$=Writeprofilestring("$logon\inventory\Install.log","IE128bit","@wksta","@date")
endif
; ****************************** MSOffice version *****************************************
$MSOdir=readvalue("$HKLMSMWCV\App Paths\excel.exe","Path")
if exist("$MSOdir\excel.exe")
$excel=getfileversion("$MSOdir\excel.exe")
select
case $excel=8.0a $esr="97 SR-1"
case $excel=8.0e $esr="97 SR-2"
case $excel=9.0.2719 $esr="2000"
case $excel=9.0.3822 $esr="2000 SR-1a"
case $excel=9.0.4430 $esr="2000 SR-2"
endselect
? " Installed "color c+/n"MS Office "color w/n"is version " color w+/n "$esr" color w/n
endif
if exist("$MSOdir\msaccess.exe")
$access=getfileversion("$MSOdir\msaccess.exe")
select
case $access=8.0.3512 $asr="97 SR-0"
case $access=8.0.4122 $asr="97 SR-1"
case $access=8.0.5903 $asr="97 SR-2"
case $access=9.0. $asr="2000"
case $access=9.0.3822 $asr="2000 SR-1a"
case $access=9.0.4506 $asr="2000 SR-2"
endselect
? " Installed "color c+/n"MS Access " color w/n"is version "color w+/n $asr color w/n
endif
if exist("$MSOdir\mspub.exe")
$pub=getfileversion("$MSOdir\mspub.exe")
select
case $pub=4.0 $psr="97"
case $pub=5.0 $psr="98"
case $pub=6.0 $psr="2000"
endselect
? " Installed "color c+/n"MS Publisher " color w/n"is version "color w+/n $psr color w/n
endif
; ****************************** Configure Outlook ********************************
$MsgKey = "$HKCUSMWNTCV\Windows Messaging Subsystem\Profiles"
$MProfile = ReadValue($MsgKey, "DefaultProfile") ;Read the current default profile
IF $MProfile = "" and $os="WinNT" ;If there is not default profile, create the profile using the PRF
$ExFileLoc = "c:" ;Location to copy temp file to
$copysource = "$logon\newprof.prf" ;name of the template prf
$File = "$ExFileLoc\newprof.PRF" ;Custom profile filename
$exserver = "areamail" ;name of mailserver
DEL "$File" ;Deletes any existing PRF file
COPY "$copysource" "$exfileloc" ;Copies baseline PRF file to c:
$section = "General"
$ = WRITEPROFILESTRING ($FILE, $section, "Custom", "1")
$ = WRITEPROFILESTRING ($FILE, $section, "ProfileName", "@UserID")
$ = WRITEPROFILESTRING ($FILE, $section, "DefaultProfile", "Yes")
$ = WRITEPROFILESTRING ($FILE, $section, "OverwriteProfile", "No")
$ = WRITEPROFILESTRING ($FILE, $section, "DefaultStore", "Service2")
$section = "Service List"
$ = WRITEPROFILESTRING ($FILE, $section, "Service1", "Microsoft Outlook Client")
$ = WRITEPROFILESTRING ($FILE, $section, "Service2", "Microsoft Exchange Server")
$ = WRITEPROFILESTRING ($FILE, $section, "Service3", "Outlook Address Book")
$section = "Service2"
$ = WRITEPROFILESTRING ($FILE, $section, "HomeServer", "$exserver")
$ = WRITEPROFILESTRING ($FILE, $section, "MailBoxName", "@userid")
$ = WRITEPROFILESTRING ($FILE, $section, "OfflineAddressBookPath", "%userprofile%\Local Settings\Application Data\Microsoft\Outlook")
$section = "Service3"
$ = WRITEPROFILESTRING ($FILE, $section, "Ben", "True")
$section = "Service4"
$ = WRITEPROFILESTRING ($FILE, $section, "Ben", "True")
? " Creating New Outlook Profile..."
SHELL "$logon\newprof.exe -P $File -x" ;Creates the Messaging profile
DEL "$File" ;Delete temp file
ENDIF
; ****************************** Adobe Acrobat Reader 4.0 **************************************
$acrobat="C:\Program Files\Adobe\Acrobat 4.0\Reader\AcroRd32.exe"
$acrover=getfileversion("$acrobat")
if exist("$acrobat")=0 or $acrover<$arcurrent
shell "$setup\apps\acrobat\setup.exe -s"
$=Writeprofilestring("$logon\inventory\Install.log","Acrobat","@wksta","@date")
else
? " Installed "color c+/n"Acrobat Reader "color w/n"is version " color w+/n $acrover color w/n
endif
; ******************************* McAfee NetShield Section ***********************************
if $os="WinNT"
if existkey("HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan")<>0
? color r+/n " McAfee NetShield is not installed" color w/n
shell("$setup\apps\mcafee\$os\install\setup.exe -s")
else
$runscan=0 $datupdate=0
$DatPath="$setup\apps\mcafee\WinNT\Update"
$EngPath="$setup\apps\mcafee\WinNT\Upgrade"
$=WRITEVALUE("$HKLMSCCS\Services\AlertManager","ObjectName","LocalSystem",REG_SZ)
$=WRITEVALUE("$HKLMSCCS\Services\McTaskManager","ObjectName","LocalSystem",REG_SZ)
; **************************** Upgrade Engine Section **********************************
? " Installed "color c+/n"McAfee NetShield "color w/n"is version " color w+/n $prd color w/n " engine "color w+/n $eng color w/n
if $eng<$McEngine
$=WRITEVALUE("$McAfeeEngKey", "szUpdateUncLocation", "$EngPath", "REG_SZ")
$=WRITEVALUE("$McAfeeEngKey", "uUpdateFrom", "1", "REG_DWORD")
? color g+/n" The Antivirus Program on your computer is being updated" color w/n
shell "$engpath\$mceng"
$runscan=1
endif
; ******************************* Upgrade DAT Section ***********************************
? " Installed "color c+/n"McAfee DAT "color w/n"is version " color w+/n $dat color w/n " dated " color w+/n $Mcdate color w/n
$datver1=substr("$dat",5,4)
$datver2=substr("$dat",3,4)
$datver=$datver2
if instr("$datver1",".")=0
$datver=$datver1
endif
$datfile=dir("$datpath\dat*.zip")
while $datfile<>"" and @error=0 and $datupdate=0
$datfilever=substr("$datfile",5,4)
if $datfilever>$datver
? color g+/n" Updating Antivirus signatures" color w/n
$=WRITEVALUE("$McAfeeRegKey"+"\Tasks\Update", "szUpdateUncLocation", "$DatPath", "REG_SZ")
$=WRITEVALUE("$McAfeeRegKey"+"\Tasks\Update", "uUpdateFrom", "1", "REG_DWORD")
shell "$mcexe /task update"
$runscan=1 $datupdate=1
; ************************* Alert Recipients Section *********************
$Rep='Priority Level:"1" Type:"Network Message" Recipient:"\\'
$=writevalue("$McAfeeAltKey","Recipient0","$rep"+$dcsa+chr(34),"REG_SZ")
$=delvalue("$McAfeeAltKey","Recipient1")
endif
$datfile=dir()
loop
; ********************************* Extra DAT Section ************************************
$dattime=comparefiletimes("$datpath\extra.dat","$datdir"+"extra.dat")
if $dattime=-3 or $dattime=1
shell("%comspec% /c net stop mcshield >nul")
copy "$datpath\extra.dat" "$datdir"
if @error=0 $runscan=1 endif
shell("%comspec% /c net start mcshield >nul")
endif
; *********************** Run Silent Scan Section *****************************
if $runscan=1
run ("$scanner /uinone /clean /delete /exit")
? color g+/n " Starting Virus Scan" color w/n
endif
endif
endif
; ************************************** Oracle Section ***************************************
$ora=readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE","ORACLE_HOME")
$oraver=getfileversion("$ora\bin\n8sw.exe")
if exist("$ora\bin\n8sw.exe")
? " Installed "color c+/n"Oracle "color w/n"version is "color w+/n"$oraver" color w/n
endif
; ************************************** Winzip Section ***************************************
if existkey("$HKLMSMWCV\App Paths\Winzip32.exe")=0
$zip=readvalue("$HKLMSMWCV\App Paths\Winzip32.exe","")
$Winzipver=getfileversion("$zip")
? " Installed "color c+/n "Winzip "color w/n"version is "color w+/n"$winzipver" color w/n
endif
; ************************************** Aspen Section ***************************************
$asekey="HKEY_LOCAL_MACHINE\SOFTWARE\Alpine Technology Group\ASPEN Survey Explorer"
$aseinstall="$setup\apps\ase"
$asepath="C:\Program Files\ASE"
if $dept="HQA" or exist("$asepath\ase.exe")=1
; ************************************* ASE 4.0 Upgrade ***************************************
if existkey("$asekey")=0
$asefiletime=getfiletime("$asepath\ase.exe")
if instr("$asefiletime","2001/03/22")=0
sendmessage("@userid"," You are being upgraded to the newest version of Aspen. This will go on for about 3 minutes AFTER the logon script finishes. Click the OK button(s) when prompted.")
shell("$aseinstall\setup.exe -s")
sleep 15
$=Writeprofilestring("$logon\inventory\Install.log","ASE 4.0","@wksta","@date")
endif
endif
;********************************* Install OASIS List HHA Reports Plugin ************************
$ieplugplus="C:\Program Files\Plus!\Microsoft Internet\PLUGINS"
$ieplugpath="C:\Program Files\Internet Explorer\PLUGINS"
if exist("$ieplugpath")=0
$ieplugpath="$ieplugplus"
endif
if exist("$ieplugpath\npdwe70.dll")=0
copy "$setup\apps\OASIS Plugin\*.dll" "$ieplugpath"
endif
if exist("$desktop\oasisl~1.url")=0 and $dept<>"MIS"
copy "$setup\apps\OASIS Plugin\oasisl~1.url" "$favorites"
copy "$setup\apps\OASIS Plugin\oasisl~1.url" "$desktop"
endif
endif
endif
return
;******************************************* end of UpdateApps ***********************************************************
;*************************************************************************************************************************
;******************************************* start of Inventory **********************************************************
:Inventory
if @ras=0
if exist("$logon\inventory\@year @month Hardware.csv")=0
if exist("$logon\inventory\Inventory History")=0
shell '%comspec% /c MD "$logon\inventory\Inventory History"'
shell '%comspec% /c MOVE $logon\inventory\*.csv "$logon\inventory\Inventory History"'
endif
$=Writeprofilestring("$logon\inventory\@year @month Hardware.csv","Hardware Inventory","ComputerName",$c+"Username"+$c+"PositionNumber"+$c+"Department"+$c+"Manufacturer"+$c+"Model"+$c+"Case"+$c+"SerialNumber"+$c+"BiosVersion"+$c+"ProcessorSpeed"+$c+"Proces sorType"+$c+"Dimm1"+$c+"Dimm2"+$c+"Dimm3"+$c+"Modem")
endif
if exist("$logon\inventory\@year @month Software.csv")=0
$=Writeprofilestring("$logon\inventory\@year @month Software.csv","Software Inventory","ComputerName",$c+"Username"+$c+"PositionNumber"+$c+"Department"+$c+"OperatingSystem"+$c+"ServicePack"+$c+"MicrosoftOffice"+$c+"MicrosoftAccess"+$c+"MicrosoftPublisher"+ $c+"InternetExplorer"+$c+"McAfeeAntivirus"+$c+"McAfeeEngine"+$c+"McAfeeDAT"+$c+"Oracle"+$c+"Winzip"+$c+"Impromptu"+$c+"Aspen")
endif
$=Writeprofilestring("$logon\inventory\@year @month Hardware.csv","Hardware Inventory","@wksta","$c@userid$c$positionnum$c$dept$c$Make$c$Model$c$Case$c$SerNo$c$Biosv$c$CPUsp$c$CPUfm$c$dimm1$c$dimm2$c$dimm3$c$modem")
$=Writeprofilestring("$logon\inventory\@year @month Software.csv","Software Inventory","@wksta","$c@userid$c$positionnum$c$dept$c$os$c$ossubver$c$esr$c$asr$c$psr$c$ier$c$prd$c$eng$c$dat$c$OraVer$c$Winzipver$c$Impver$c$asefiletime")
endif
Return
;******************************************* end of Inventory ************************************************************