Our IT Security group uses Hyena to create mailboxes for users (user objects are created with both IDM software and OnePoint). They all got new PCs recently and I didn’t want to have to manually install and configure Hyena and all the prereqs again, after having done this for them earlier this year. The forums don’t say much about automating a Hyena installation, with the exception of an old post about simply copying the files to another workstation. So I spent a little time working through the files and registry entries necessary to silently install Hyena and configure the workstation to get the shared settings automatically, as well as supress any dialog boxes about newsletters, first-time running, Wise update, etc. I ran it by Chuck, and so to benefit others, here is what my batch file does:
First, I install the adminpak since the ADUC and NNTP snap-ins are needed for Exchange management.
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>@echo off
rem Install AdminPak
echo Installing Windows Administration Tools…
\\[server]\[share]\adminpak.msi /q</pre></div></div></div></div>
Then I install IIS manager, since the SMTP and W3SVC snap-ins are needed for Exchange ESM installation. Our OS images are locked down so IIS is not normally visible as an option to install. So I modify sysoc.inf to allow for that. Then I use sysocmgr.exe with an unattend file to install the Common Files and IIS Manager. Note: With Windows XP SP2, you no longer need to install the SMTP and W3SVC services to have the snap-ins installed; they are now included in the IIS Manager installation.
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>rem Install IIS
echo Installing IIS management snap-in...
regedit /S /E c:\WinSourcePath.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Window s\CurrentVersion\Setup"
regedit /S \\[server]\[share]\WinSourcePath-custom.reg
copy %windir%\inf\sysoc.inf c:\ >nul
copy \\[server]\[share]\sysoc.inf %windir%\inf\ /y >nul
sysocmgr.exe /i:sysoc.inf /u:\\[server]\[share]\IISUnattend.txt</pre></div></div></div></div>
Next, I install ESM and Exchange SP2 using an unattend file. This allows for a completely automated installation of Exchange, but it is just ESM for this installation. The "ping wait" command is a poor-man's sleep function since sleep.exe isn't included out-of-the-box and I didn't want to require a resource kit tool to run this. The Exchange setup executable spawns sub-processes so the focus returns to the command window before setup has actually finished. The loop checks for the log file entry showing the process is completed before starting the next line in the script. Same for the SP2 executable.
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>rem Install ESM
echo Installing Exchange management tools...
if exist "c:\Exchange Server Setup Progress.log" del "c:\Exchange Server Setup Progress.log"
\\[server]\[share]\i386\setup.exe /unattendfile \\[server]\[share]\esmonly.ini
:ESMInstallWait
ping 1.1.1.1 -n 1 -w 10000 >nul
type "c:\Exchange Server Setup Progress.log" | findstr /C:"Setup completed successfully" >nul
if %errorlevel% == 1 ping 1.1.1.1 -n 1 -w 5000 >nul & goto ESMInstallWait
echo Installing Exchange service pack...
ren "c:\Exchange Server Setup Progress.log" "Exchange Server Setup Progress-RTM.log"
\\[server]\[share]\sp2\update.exe /unattendfile \\[server]\[share]\esmSP2.ini
:SP2InstallWait
ping 1.1.1.1 -n 1 -w 10000 >nul
type "c:\Exchange Server Setup Progress.log" | findstr /C:"Setup completed successfully" >nul
if %errorlevel% == 1 ping 1.1.1.1 -n 1 -w 5000 >nul & goto SP2InstallWait</pre></div></div></div></div>
Now for the part most people here would be interested in, Hyena. This is just a scripted copy of the necessary files and registry entries needed for Hyena to run and work out-of-the-box for our group with no configuration needed by them:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>rem Install Hyena
echo Installing Hyena...
if not exist "c:\Program Files\Hyena" mkdir "c:\Program Files\Hyena"
copy \\[server]\[share]\ScriptedInstall\Binaries\*.* "c:\Program Files\Hyena\" >nul
regedit /S \\[server]\[share]\ScriptedInstall\Registry\hyenainstall.reg
if not exist "c:\Documents and Settings\All Users\Start Menu\Programs\Hyena" mkdir "c:\Documents and Settings\All Users\Start Menu\Programs\Hyena"
copy \\[server]\[share]\ScriptedInstall\Shortcuts\*.* "c:\Documents and Settings\All Users\Start Menu\Programs\Hyena" >nul
rem Cleanup
regedit /S c:\WinSourcePath.reg
del c:\WinSourcePath.reg
copy c:\sysoc.inf %windir%\inf\ /y >nul
del c:\sysoc.inf
echo Installation complete.
pause
"c:\documents and settings\all users\start menu\programs\hyena\hyena.lnk"</pre></div></div></div></div>
The last line just launches Hyena for them as a convenience. What you will find below are the files I copy to the program directory on the target machine. You will also see the registry keys and values I create to allow Hyena to run the first time with no normal first-time-run dialogs:
Files:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>DirectoryQueries.CFG
directoryschema.cfg
export.ini
Exporter.exe
filetemplates.cfg
hyena.chm
HYENA.exe
hyena_hotfix_list.dat
hyenarpt.mdb.v40
INSTALL.LOG
Perf_counters.dat
Perf_queries.dat
RegTemplates.CFG
STexport.chm
stexport.exe
UNWISE.EXE
WiseUpdt.exe
Wmi_queries.dat
WMIQueries.CFG </pre></div></div></div></div>
Registry:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Adkins Resource]
[HKEY_CURRENT_USER\Software\Adkins Resource\Hyena]
[HKEY_CURRENT_USER\Software\Adkins Resource\Hyena\HomeDirTemplates]
"CheckHomeDirSettings"=dword:00000001
[HKEY_CURRENT_USER\Software\Adkins Resource\Hyena\Win32]
"CheckDatabaseUpgrade"=dword:00000001
"AccessKey"="[key]"
"Licensee"="[Licensee Name]"
"AskForNewsletterSignup"=dword:000000 01
"CheckMaintenanceExpiration"=dword:00000 000
"CheckMaintenanceExpiration2"=dword:0000 0000
"UpgradedDomainList"=dword:00000001
"UpgradedWindowsDomains"=dword:000000 01
"ForcedWmiNode"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate\AppPaths]
"c:\\progra~1\\hyena\\wiseupdt.exe"=&quo t;Hyena"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate\Apps]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate\Apps\Hyena]
"Version"="6.5.0"
"SettingsURL"="http://www.systemtools.com/hyena_eng30.ini"
"UserName"=""
"Password"=""
"WebPage"="http://www.systemtools.com/hyena/dow...rame.htm"
"LastCheck"=dword:4398a9e5
"CheckDays"=dword:000f423f
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\Hyena]
"DisplayName"="Hyena"
"UninstallString"="C:\\PROGRA~1\\Hy ena\\UNWISE.EXE C:\\PROGRA~1\\Hyena\\INSTALL.LOG"
"DisplayVersion"="6.5.0"
"HelpLink"="http://www.systemtools.com/HyenaHelp"
"HelpTelephone"="830-779-2349"
"Publisher"="SystemTools Software Inc."
"URLInfoAbout"="support@systemtools .com"
"Contact"="[email protected]&qu ot;
"Comments"="Windows NT/2000/XP System Management Software"
"DisplayIcon"="C:\\PROGRA~1\\Hyena\ \HYENA.exe,-0"</pre></div></div></div></div>
Shortcuts:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>Hyena.lnk *Target includes path to settings.ini:
"C:\Program Files\Hyena\HYENA.exe" "[path to settings.ini]"</pre></div></div></div></div>
The registry entries still add Hyena to Add/Remove Programs so it can be uninstalled, if necessary. I didn’t know know the consequences of not including Wise Update, so I still add that, but I set the update frequency to 999,999 days. If anyone has any questions or comments about the script, please let me know.
Scott.
[12/05/05 edit: Added some error correction to account for one or more portions of the tools already being installed. Also added code to accommodate the way Exchange setup runs and returns focus to the window before setup is complete. Things like start /wait and using .bat instead of .cmd didn't work.]
[This message has been edited by skippy389 (edited 12-15-2005).]
First, I install the adminpak since the ADUC and NNTP snap-ins are needed for Exchange management.
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>@echo off
rem Install AdminPak
echo Installing Windows Administration Tools…
\\[server]\[share]\adminpak.msi /q</pre></div></div></div></div>
Then I install IIS manager, since the SMTP and W3SVC snap-ins are needed for Exchange ESM installation. Our OS images are locked down so IIS is not normally visible as an option to install. So I modify sysoc.inf to allow for that. Then I use sysocmgr.exe with an unattend file to install the Common Files and IIS Manager. Note: With Windows XP SP2, you no longer need to install the SMTP and W3SVC services to have the snap-ins installed; they are now included in the IIS Manager installation.
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>rem Install IIS
echo Installing IIS management snap-in...
regedit /S /E c:\WinSourcePath.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Window s\CurrentVersion\Setup"
regedit /S \\[server]\[share]\WinSourcePath-custom.reg
copy %windir%\inf\sysoc.inf c:\ >nul
copy \\[server]\[share]\sysoc.inf %windir%\inf\ /y >nul
sysocmgr.exe /i:sysoc.inf /u:\\[server]\[share]\IISUnattend.txt</pre></div></div></div></div>
Next, I install ESM and Exchange SP2 using an unattend file. This allows for a completely automated installation of Exchange, but it is just ESM for this installation. The "ping wait" command is a poor-man's sleep function since sleep.exe isn't included out-of-the-box and I didn't want to require a resource kit tool to run this. The Exchange setup executable spawns sub-processes so the focus returns to the command window before setup has actually finished. The loop checks for the log file entry showing the process is completed before starting the next line in the script. Same for the SP2 executable.
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>rem Install ESM
echo Installing Exchange management tools...
if exist "c:\Exchange Server Setup Progress.log" del "c:\Exchange Server Setup Progress.log"
\\[server]\[share]\i386\setup.exe /unattendfile \\[server]\[share]\esmonly.ini
:ESMInstallWait
ping 1.1.1.1 -n 1 -w 10000 >nul
type "c:\Exchange Server Setup Progress.log" | findstr /C:"Setup completed successfully" >nul
if %errorlevel% == 1 ping 1.1.1.1 -n 1 -w 5000 >nul & goto ESMInstallWait
echo Installing Exchange service pack...
ren "c:\Exchange Server Setup Progress.log" "Exchange Server Setup Progress-RTM.log"
\\[server]\[share]\sp2\update.exe /unattendfile \\[server]\[share]\esmSP2.ini
:SP2InstallWait
ping 1.1.1.1 -n 1 -w 10000 >nul
type "c:\Exchange Server Setup Progress.log" | findstr /C:"Setup completed successfully" >nul
if %errorlevel% == 1 ping 1.1.1.1 -n 1 -w 5000 >nul & goto SP2InstallWait</pre></div></div></div></div>
Now for the part most people here would be interested in, Hyena. This is just a scripted copy of the necessary files and registry entries needed for Hyena to run and work out-of-the-box for our group with no configuration needed by them:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>rem Install Hyena
echo Installing Hyena...
if not exist "c:\Program Files\Hyena" mkdir "c:\Program Files\Hyena"
copy \\[server]\[share]\ScriptedInstall\Binaries\*.* "c:\Program Files\Hyena\" >nul
regedit /S \\[server]\[share]\ScriptedInstall\Registry\hyenainstall.reg
if not exist "c:\Documents and Settings\All Users\Start Menu\Programs\Hyena" mkdir "c:\Documents and Settings\All Users\Start Menu\Programs\Hyena"
copy \\[server]\[share]\ScriptedInstall\Shortcuts\*.* "c:\Documents and Settings\All Users\Start Menu\Programs\Hyena" >nul
rem Cleanup
regedit /S c:\WinSourcePath.reg
del c:\WinSourcePath.reg
copy c:\sysoc.inf %windir%\inf\ /y >nul
del c:\sysoc.inf
echo Installation complete.
pause
"c:\documents and settings\all users\start menu\programs\hyena\hyena.lnk"</pre></div></div></div></div>
The last line just launches Hyena for them as a convenience. What you will find below are the files I copy to the program directory on the target machine. You will also see the registry keys and values I create to allow Hyena to run the first time with no normal first-time-run dialogs:
Files:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>DirectoryQueries.CFG
directoryschema.cfg
export.ini
Exporter.exe
filetemplates.cfg
hyena.chm
HYENA.exe
hyena_hotfix_list.dat
hyenarpt.mdb.v40
INSTALL.LOG
Perf_counters.dat
Perf_queries.dat
RegTemplates.CFG
STexport.chm
stexport.exe
UNWISE.EXE
WiseUpdt.exe
Wmi_queries.dat
WMIQueries.CFG </pre></div></div></div></div>
Registry:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Adkins Resource]
[HKEY_CURRENT_USER\Software\Adkins Resource\Hyena]
[HKEY_CURRENT_USER\Software\Adkins Resource\Hyena\HomeDirTemplates]
"CheckHomeDirSettings"=dword:00000001
[HKEY_CURRENT_USER\Software\Adkins Resource\Hyena\Win32]
"CheckDatabaseUpgrade"=dword:00000001
"AccessKey"="[key]"
"Licensee"="[Licensee Name]"
"AskForNewsletterSignup"=dword:000000 01
"CheckMaintenanceExpiration"=dword:00000 000
"CheckMaintenanceExpiration2"=dword:0000 0000
"UpgradedDomainList"=dword:00000001
"UpgradedWindowsDomains"=dword:000000 01
"ForcedWmiNode"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate\AppPaths]
"c:\\progra~1\\hyena\\wiseupdt.exe"=&quo t;Hyena"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate\Apps]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wise Solutions\WiseUpdate\Apps\Hyena]
"Version"="6.5.0"
"SettingsURL"="http://www.systemtools.com/hyena_eng30.ini"
"UserName"=""
"Password"=""
"WebPage"="http://www.systemtools.com/hyena/dow...rame.htm"
"LastCheck"=dword:4398a9e5
"CheckDays"=dword:000f423f
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\Hyena]
"DisplayName"="Hyena"
"UninstallString"="C:\\PROGRA~1\\Hy ena\\UNWISE.EXE C:\\PROGRA~1\\Hyena\\INSTALL.LOG"
"DisplayVersion"="6.5.0"
"HelpLink"="http://www.systemtools.com/HyenaHelp"
"HelpTelephone"="830-779-2349"
"Publisher"="SystemTools Software Inc."
"URLInfoAbout"="support@systemtools .com"
"Contact"="[email protected]&qu ot;
"Comments"="Windows NT/2000/XP System Management Software"
"DisplayIcon"="C:\\PROGRA~1\\Hyena\ \HYENA.exe,-0"</pre></div></div></div></div>
Shortcuts:
<div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body"><div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>Hyena.lnk *Target includes path to settings.ini:
"C:\Program Files\Hyena\HYENA.exe" "[path to settings.ini]"</pre></div></div></div></div>
The registry entries still add Hyena to Add/Remove Programs so it can be uninstalled, if necessary. I didn’t know know the consequences of not including Wise Update, so I still add that, but I set the update frequency to 999,999 days. If anyone has any questions or comments about the script, please let me know.
Scott.
[12/05/05 edit: Added some error correction to account for one or more portions of the tools already being installed. Also added code to accommodate the way Exchange setup runs and returns focus to the window before setup is complete. Things like start /wait and using .bat instead of .cmd didn't work.]
[This message has been edited by skippy389 (edited 12-15-2005).]