Hi there,
Thanks for the repy. I have also seen Setup Factory and they can do it... However, not impressed with their product. Here are the batch files as promised.
Protect Server Batch File
@echo off
REM Installer V2.01 - Steve James 21st November 2009
REM Start install and copy files to appropriate folders
Echo Copying Files ...
mkdir c:\protect
xcopy protect\*.* c:\protect /s /i
xcopy "Protect Server\wwwroot\*.*" c:\inetpub\wwwroot /s /i
copy c:\protect\reg\regentry.bat "c:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\regentry.bat"
copy c:\protect\reg\regentry.bat "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\regentry.bat"
copy c:\protect\reg\Getip.bat "c:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Getip.bat"
copy c:\protect\reg\Getip.bat "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\Getip.bat"
echo %date% %time% Files have been copied sucessfully > c:\protect\logs\installer.txt
REM Set Password and Add Recovery User to Local Admins
Echo Creating Users ...
echo "Please Enter Customer Password for Recovery User"
set /p Password=
net user recovery %Password% /add
net localgroup "administrators" recovery /add
net user protect Ogldrt35t /add
net localgroup "administrators" protect /add
echo %date% %time% User recovery and protect created >> c:\protect\logs\installer.txt
REM Set Passwords No Expire
Echo Setting Passwords to NOT Expire ...
wmic path Win32_UserAccount where Name='administrator' set PasswordExpires=false
wmic path Win32_UserAccount where Name='recovery' set PasswordExpires=false
wmic path Win32_UserAccount where Name='protect' set PasswordExpires=false
echo %date% %time% Password Set To No Expire >> c:\protect\logs\installer.txt
REM Install IIS 7 On Windows 2008
Echo Installing IIS 7 ...
%windir%\Sysnative\servermanagercmd.exe -install Web-Server -a
echo %date% %time% IIS 7 installed sucessfully >> c:\protect\logs\installer.txt
REM Install Powershell
Echo Installing Powershell ...
%windir%\Sysnative\servermanagercmd.exe -install powershell
echo %date% %time% Powershell installed sucessfully >> c:\protect\logs\installer.txt
REM Set Execution Policy Unrestricted
Echo Setting Execution Policy ...
%windir%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -command Set-ExecutionPolicy Unrestricted
echo %date% %time% Execution policy set sucessfully >> c:\protect\logs\installer.txt
REM Install .net framework 3
Echo Installing .Net Framework 3 ...
%windir%\Sysnative\servermanagercmd.exe -install NET-Framework
echo %date% %time% .Net Framework 3 installed sucessfully >> c:\protect\logs\installer.txt
REM Install .net framework 3.5
Echo Installing .Net Framework 3.5 ...
"Common\dotnetfx35.exe"
echo %date% %time% .Net Framework 3.5 installed sucessfully >> c:\protect\logs\installer.txt
REM Install SNMP Services
Echo Installing SNMP Services ...
%windir%\Sysnative\servermanagercmd.exe -install SNMP-Services
echo %date% %time% SNMP Services installed sucessfully >> c:\protect\logs\installer.txt
REM Register DLL Files
Echo Registering DLL Files ...
C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil.exe /LogFile= /InstallStateDir="c:\protect" "c:\protect\lib\System.Management.Automation.dll"
echo %date% %time% .DLL registered sucessfully >> c:\protect\logs\installer.txt
REM Install Hyper-V on Windows 2008
Echo Installing Hyper-V ...
%windir%\Sysnative\servermanagercmd.exe -install hyper-v
echo %date% %time% Hyper-V installed sucessfully >> c:\protect\logs\installer.txt
REM Copy Shortcuts
Echo Copying Shortcuts ...
copy "Protect Server\Shortcuts\*.lnk" "c:\users\administrator\desktop"
xcopy "Protect Server\Remote Monitoring\*.*" "c:\users\administrator\desktop\Remote Monitoring" /s /i
echo %date% %time% Shortcuts copied sucessfully >> c:\protect\logs\installer.txt
REM Disable Windows Firewall
Echo Disabling Firewall ...
netsh firewall set opmode disable
echo %date% %time% Windows Firewall Disabled >> c:\protect\logs\installer.txt
REM Enable RDP
Echo Enabling RDP ...
regedit /s "c:\protect\reg\enablerdp.reg"
echo %date% %time% RDP Enabled >> c:\protect\logs\installer.txt
REM Install OGL Protect Services
Echo Installing OGL Protect Services ...
c:\windows\Microsoft.NET\Framework\v2.0.50727\installutil /LogFile= /InstallStateDir="c:\protect" "c:\protect\bin\OGL protect backup.exe"
c:\windows\Microsoft.NET\Framework\v2.0.50727\installutil /LogFile= /InstallStateDir="c:\protect" "c:\protect\bin\OGL protect diagnostics.exe"
c:\windows\Microsoft.NET\Framework\v2.0.50727\installutil /LogFile= /InstallStateDir="c:\protect" "c:\protect\bin\OGL protect disk mounter.exe"
echo %date% %time% OGL protect services installed sucessfully >> c:\protect\logs\installer.txt
REM Install Visual C Reqs
Echo Install Visual C++ Files
"Common\VisualC\vcredist_x86.exe" /q
"Common\VisualC\vcredist_x64.exe" /q
REM Install DoubleTake
Echo Installing DoubleTake ...
"Common\dbltake x64\setup\dtsw\x64\setup.exe"
echo %date% %time% Double Take Installed sucessfully >> c:\protect\logs\installer.txt
REM Registry Entries
Echo Inserting Registry Entries ...
regedit /s "c:\protect\reg\ogldisk.reg"
regedit /s "c:\protect\reg\dtdepend.reg"
echo %date% %time% Registry Entries installed successfully >> c:\protect\logs\installer.txt
REM Install Winimage
Echo Installing WinImage ...
"Protect Server\wisetup.exe"
echo %date% %time% WinImage Installed Successfully >> c:\protect\logs\installer.txt
REM Change Computer Name To ProtectPlus
Echo Changing Computer Name ...
"Protect Server\computername.vbs"
echo %date% %time% Computer Name Changed to ProtectPlus >> c:\protect\logs\installer.txt
REM Configure IE (Remove nag screen, disable IE ESC, sets home page to 127.0.0.1/protect.asp
Echo Configuring Internet Explorer Home Page ...
REM Backup registry keys
REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" "%TEMP%.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft.Active Setup.Installed Components.A509B1A7-37EF-4b3f-8CFC-4F3A74704073.reg"
REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" "%TEMP%.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft.Active Setup.Installed Components.A509B1A8-37EF-4b3f-8CFC-4F3A74704073.reg"
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" /v "IsInstalled" /t REG_DWORD /d 0 /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" /v "IsInstalled" /t REG_DWORD /d 0 /f
Rundll32 iesetup.dll, IEHardenLMSettings
Rundll32 iesetup.dll, IEHardenUser
Rundll32 iesetup.dll, IEHardenAdmin
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" /f /va
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" /f /va
REM Optional to remove warning on first IE Run and set home page to blank.
REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "First Home Page" /f
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Default_Page_URL" /t REG_SZ /d "
http://127.0.0.1/protect.asp" /f
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t REG_SZ /d "
http://127.0.0.1/protect.asp" /f
echo %date% %time% IE Configured and Home Page Setup - 127.0.0.1/protect.asp >> c:\protect\logs\installer.txt
REM Restart Windows 2008 in 30 Seconds
Echo Restarting Windows ...
shutdown -r
echo %date% %time% Server has been set to restart sucessfully >> c:\protect\logs\installer.txt
REM Disable UAC
Echo Disabling UAC ...
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
echo %date% %time% Windows UAC Disabled >> c:\protect\logs\installer.txt
Source Server Batch File
@echo off
net user protect Ogldrt35t /add
net localgroup "administrators" protect /add
mkdir c:\protect
copy "OGL*.*" c:\protect
copy Pool*.* c:\protect
net share protect="c:\protect" /GRANT:protect,FULL
CACLS c:\protect /E /G protect:F
wmic path Win32_UserAccount where Name='protect' set PasswordExpires=false
xcopy "..\protect\bin\ogl*.*" c:\protect /s /i
"..\Common\VisualC\vcredist_x86.exe" /q
"..\Common\VisualC\vcredist_x64.exe" /q
REM "..\Common\dotnetfx35.exe"
%windir%\Sysnative\servermanagercmd.exe -install NET-Framework
"..\Common\dbltake x32\setup\dtsw\i386\setup.exe"
c:\windows\Microsoft.NET\Framework\v2.0.50727\installutil.exe /LogFile= /InstallStateDir="c:\protect" "OGL protect failover helper.exe"
REGEDIT /S c:\protect\ogldisk.reg