181 lines
5 KiB
Batchfile
181 lines
5 KiB
Batchfile
|
@Echo Off
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Verify that %RootDrive% has been configured and set it for this script.
|
||
|
Rem
|
||
|
|
||
|
Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
|
||
|
If "%_CHKROOT%" == "FAIL" Goto Done
|
||
|
Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
|
||
|
If "%_SETPATHS%" == "FAIL" Goto Done
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Get the installation location of Outlook 98 from the registry. If
|
||
|
Rem not found, assume Outlook isn't installed and display an error message.
|
||
|
Rem
|
||
|
|
||
|
..\ACRegL %Temp%\O98.Cmd O98INST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "OfficeBin" "Stripchar\1"
|
||
|
If Not ErrorLevel 1 Goto Cont0
|
||
|
Echo.
|
||
|
Echo Unable to retrieve Outlook 98 installation location from the registry.
|
||
|
Echo Verify that Outlook 98 has already been installed and run this script
|
||
|
Echo again.
|
||
|
Echo.
|
||
|
Pause
|
||
|
Goto Done
|
||
|
|
||
|
:Cont0
|
||
|
Call %Temp%\O98.Cmd
|
||
|
Del %Temp%\O98.Cmd >Nul: 2>&1
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Change Registry Keys to make paths point to user specific
|
||
|
Rem directories.
|
||
|
Rem
|
||
|
|
||
|
Rem If not currently in Install Mode, change to Install Mode.
|
||
|
Set __OrigMode=Install
|
||
|
ChgUsr /query > Nul:
|
||
|
if Not ErrorLevel 101 Goto Begin
|
||
|
Set __OrigMode=Exec
|
||
|
Change User /Install > Nul:
|
||
|
:Begin
|
||
|
|
||
|
|
||
|
REM
|
||
|
REM If Office97 is installed or Office not installed, use Office97 per-user dir
|
||
|
REM If Office95 is installed, use Office95 per-user dir
|
||
|
REM
|
||
|
Set OffUDir=Office97
|
||
|
|
||
|
..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "" ""
|
||
|
If Not ErrorLevel 1 Goto OffChk
|
||
|
|
||
|
..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRoot" "" ""
|
||
|
If Not ErrorLevel 1 Goto Off95
|
||
|
|
||
|
..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRootPro" "" ""
|
||
|
If Not ErrorLevel 1 Goto Off95
|
||
|
|
||
|
set OFFINST=%O98INST%
|
||
|
goto Cont1
|
||
|
|
||
|
:Off95
|
||
|
Set OffUDir=Office95
|
||
|
|
||
|
:OffChk
|
||
|
|
||
|
Call %Temp%\Off.Cmd
|
||
|
Del %Temp%\Off.Cmd >Nul: 2>&1
|
||
|
|
||
|
:Cont1
|
||
|
|
||
|
..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\Outlk98.Key Outlk98.Tmp
|
||
|
..\acsr "#INSTDIR#" "%OFFINST%" Outlk98.Tmp Outlk98.Tmp2
|
||
|
..\acsr "#OFFUDIR#" "%OffUDir%" Outlk98.Tmp2 Outlk98.Tmp3
|
||
|
..\acsr "#MY_DOCUMENTS#" "%MY_DOCUMENTS%" Outlk98.Tmp3 Outlk98.Key
|
||
|
|
||
|
|
||
|
Del Outlk98.Tmp >Nul: 2>&1
|
||
|
Del Outlk98.Tmp2 >Nul: 2>&1
|
||
|
Del Outlk98.Tmp3 >Nul: 2>&1
|
||
|
|
||
|
regini Outlk98.key > Nul:
|
||
|
|
||
|
Rem If original mode was execute, change back to Execute Mode.
|
||
|
If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
|
||
|
Set __OrigMode=
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Update Olk98Usr.Cmd to reflect actual installation directory and
|
||
|
Rem add it to the UsrLogn2.Cmd script
|
||
|
Rem
|
||
|
|
||
|
..\acsr "#INSTDIR#" "%OFFINST%" ..\Logon\Template\Olk98Usr.Cmd Olk98Usr.Tmp
|
||
|
..\acsr "#OFFUDIR#" "%OffUDir%" Olk98Usr.Tmp ..\Logon\Olk98Usr.Cmd
|
||
|
Del Olk98Usr.Tmp
|
||
|
|
||
|
FindStr /I Olk98Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
|
||
|
If Not ErrorLevel 1 Goto Skip1
|
||
|
Echo Call Olk98Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
|
||
|
:Skip1
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Create a msremote.sfs directory under SystemRoot. This allows users to
|
||
|
Rem use the "Mail and Fax" icon in the control panel to create a profile.
|
||
|
Rem
|
||
|
|
||
|
md %systemroot%\msremote.sfs > Nul: 2>&1
|
||
|
|
||
|
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Allow change access for TS Users on the frmcache.dat file for outlook
|
||
|
Rem
|
||
|
|
||
|
If Exist %SystemRoot%\Forms\frmcache.dat cacls %SystemRoot%\forms\frmcache.dat /E /G "Terminal Server User":C >NUL: 2>&1
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
|
||
|
Rem #########################################################################
|
||
|
|
||
|
Rem
|
||
|
Rem Create a msfslog.txt file under SystemRoot and give Terminal Server Users
|
||
|
Rem full permissions on this file.
|
||
|
Rem
|
||
|
|
||
|
If Exist %systemroot%\MSFSLOG.TXT Goto MsfsACLS
|
||
|
Copy Nul: %systemroot%\MSFSLOG.TXT >Nul: 2>&1
|
||
|
:MsfsACLS
|
||
|
Cacls %systemroot%\MSFSLOG.TXT /E /P "Terminal Server User":F >Nul: 2>&1
|
||
|
|
||
|
|
||
|
Echo.
|
||
|
Echo To insure proper operation of Outlook 98, users who are
|
||
|
Echo currently logged on must log off and log on again before
|
||
|
Echo running Outlook 98.
|
||
|
Echo.
|
||
|
Echo Microsoft Outlook 98 Multi-user Application Tuning Complete
|
||
|
|
||
|
Rem
|
||
|
Rem Get the permission compatibility mode from the registry.
|
||
|
Rem If TSUserEnabled is 0 we need to warn user to change mode.
|
||
|
Rem
|
||
|
|
||
|
..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
|
||
|
|
||
|
If Exist "%Temp%\tsuser.Cmd" (
|
||
|
Call "%Temp%\tsuser.Cmd"
|
||
|
Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
|
||
|
)
|
||
|
|
||
|
If NOT %TSUSERENABLED%==0 goto SkipWarning
|
||
|
Echo.
|
||
|
Echo IMPORTANT!
|
||
|
Echo Terminal Server is currently running in Default Security mode.
|
||
|
Echo This application requires the system to run in Relaxed Security mode
|
||
|
Echo (permissions compatible with Terminal Server 4.0).
|
||
|
Echo Use Terminal Services Configuration to view and change the Terminal
|
||
|
Echo Server security mode.
|
||
|
Echo.
|
||
|
|
||
|
:SkipWarning
|
||
|
|
||
|
Pause
|
||
|
|
||
|
:done
|
||
|
|