Remove Old GINA & Install New GINA

Created to work with LANDesk. It removes an old GINA, and then installs new GINA by using installation snapshots of the 32/64 bit setups.

@Echo on
rem ——————————————————————
rem author Eddie Jackson
rem data 10/07/2013
rem info Uninstalls old GINA
rem info Installs new GINA
rem tested Works for 32bit/64bit OS
rem ——————————————————————

title Administrative Installation by Eddie Jackson
color 0a
set CurDir=%cd%

set UserN=%username%
if [%UserN%] EQU [] set UserN=landesk
if [%UserN%] EQU %computername% set UserN=landesk

rem DISABLED for “pull” files
rem if not “%1” == “” set temp=%1

c:\windows\system32\ping.exe -n 8 127.0.0.1>nul

rem kill open browsers
c:\windows\system32\taskkill /f /im iexplore.exe
c:\windows\system32\taskkill /f /im chrome.exe

rem create event log
EVENTCREATE /T INFORMATION /ID 777 /d “GINA 1.0 package installation STARTED by %UserN%”

rem uninstall 32bit old gina
c:\windows\system32\msiexec.exe /x {228906A7-8F1D-48FE-9286-056CDE2880A9} /qn /norestart
rem uninstall 64bit old gina
c:\windows\system32\msiexec.exe /x {50E9CF6B-28AF-444A-9618-4A948D536248} /qn /norestart

rem post uninstall cleanup
rem remove registry keys
%windir%\system32\REG.exe DELETE “HKEY_LOCAL_MACHINE\SOFTWARE\TheDotNetFactory” /f
%windir%\system32\REG.exe DELETE “HKEY_LOCAL_MACHINE\SOFTWARE\TheDotNetFactory” /f /reg:64

rem 64bit simple detection
if exist “C:\Program Files (x86)\LANDESK\LDClient\sdmcache” (
rem install 64bit new gina – contains snapshot
“%CurDir%\fim64.exe”
“C:\Program Files (x86)\LANDesk\LDClient\sdmcache\apps\misc\gina\fim64.exe”
rem change service from disabled to automatically start
sc.exe config “FIMPasswordReset” start= auto
goto :END
)

rem 32bit simple detection
if exist “C:\Program Files\LANDesk\LDClient\sdmcache” (
rem install 32bit new gina – contains snapshot
“%CurDir%\fim32.exe”
“C:\Program Files\LANDesk\LDClient\sdmcache\apps\misc\gina\fim32.exe”
goto :END
)

:END
rem registry stamp
%windir%\system32\REG.exe ADD “HKEY_LOCAL_MACHINE\SOFTWARE\MYSOFTWARE\GINA\1.0.0.0” /v InstallDate /d “%date% %time%” /t REG_SZ /f
%windir%\system32\REG.exe ADD “HKEY_LOCAL_MACHINE\SOFTWARE\MYSOFTWARE\GINA\1.0.0.0” /v InstalledBy /d “%UserN%” /t REG_SZ /f

rem create event log
EVENTCREATE /T INFORMATION /ID 777 /d “GINA 1.0 package installation COMPLETED SUCCESSFULLY!”

rem exit
exit /b 0

email me