Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.7 KiB

  1. @echo off
  2. Rem #########################################################################
  3. Rem
  4. Rem Create directories for application specific data in the
  5. Rem user's home directory.
  6. Rem
  7. call TsMkUDir "%RootDrive%\Office95"
  8. Rem #########################################################################
  9. Rem Check to see if this script is running on Alpha. If it is, set the proper Share tools
  10. rem
  11. rem
  12. Set __SharedTools=Shared Tools
  13. If Not "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto acsrCont1
  14. If Not Exist "%ProgramFiles(x86)%" goto acsrCont1
  15. Set __SharedTools=Shared Tools (x86)
  16. :acsrCont1
  17. Rem #########################################################################
  18. Rem
  19. Rem Create Custom.dic file in user's directory
  20. Rem
  21. If Not Exist "%RootDrive%\Office95\Custom.Dic" Copy Nul: "%RootDrive%\Office95\Custom.Dic" >Nul: 2>&1
  22. Rem #########################################################################
  23. REM
  24. REM Get the dictionary name and path
  25. REM
  26. ..\ACRegL "%Temp%\Proj95_1.Cmd" DictPath "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Spelling\1033\Normal" "Dictionary" "StripChar\1"
  27. If ErrorLevel 1 Goto Done
  28. Call %Temp%\Proj95_1.Cmd
  29. Del %Temp%\Proj95_1.Cmd >Nul: 2>&1
  30. ..\ACRegL "%Temp%\Proj95_3.Cmd" DictName "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Spelling\1033\Normal" "Dictionary" "StripPath"
  31. If ErrorLevel 1 Goto Done
  32. Call %Temp%\Proj95_3.Cmd
  33. Del %Temp%\Proj95_3.Cmd >Nul: 2>&1
  34. Rem #########################################################################
  35. REM
  36. REM If registry setting for path changed then reset.
  37. REM This might have happened if anothe MS Office App was installed.
  38. REM
  39. If "%DictPath%"=="%RootDrive%\Office95" Goto GetDictionary
  40. ..\ACRegL "%Temp%\Proj95_2.Cmd" Dictionary "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Spelling\1033\Normal" "Dictionary" ""
  41. If ErrorLevel 1 Goto Done
  42. Call %Temp%\Proj95_2.Cmd
  43. Del %Temp%\Proj95_2.Cmd >Nul: 2>&1
  44. REM Guard against two users coming through this code.
  45. REM This protects user A changing the DictPath after
  46. REM user B retrieves it.
  47. ..\ACRegL "%Temp%\Proj95_7.Cmd" OrigDictPath "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Spelling\1033\Normal" "Dictionary" "StripChar\1"
  48. If ErrorLevel 1 Goto Done
  49. Call %Temp%\Proj95_7.Cmd
  50. Del %Temp%\Proj95_7.Cmd >Nul: 2>&1
  51. if "%OrigDictPath%"=="%RootDrive%\Office95" Goto GetDictionary
  52. ..\acsr "#DICTNAME#" "%DictName%" Template\prj95Usr.key %Temp%\Proj95_4.tmp
  53. ..\acsr "#ROOTDRIVE#" "%RootDrive%" %Temp%\Proj95_4.tmp %Temp%\Proj95_5.tmp
  54. ..\acsr "#DICTIONARY#" "%Dictionary%" %Temp%\Proj95_5.tmp %Temp%\Proj95_6.tmp
  55. ..\acsr "#__SharedTools#" "%__SharedTools%" %Temp%\Proj95_6.tmp %Temp%\Prj95Usr.Key
  56. Rem Change Registry Keys to make dictionary path point to user specific directories.
  57. regini %Temp%\prj95Usr.key > Nul:
  58. Del %Temp%\Proj95_4.tmp >Nul: 2>&1
  59. Del %Temp%\Proj95_5.tmp >Nul: 2>&1
  60. Del %Temp%\Proj95_6.tmp >Nul: 2>&1
  61. Del %Temp%\prj95Usr.key >Nul: 2>&1
  62. goto CopyDictionary
  63. Rem #########################################################################
  64. REM
  65. REM If the dictionary path did not change grab the original name and
  66. REM path from the registry.
  67. REM
  68. :GetDictionary
  69. ..\ACRegL "%Temp%\Proj95_6.Cmd" Dictionary "HKLM\Software\Microsoft\%__SharedTools%\Proofing Tools\Spelling\1033\Normal" "OrigDictionary" ""
  70. If ErrorLevel 1 Goto SpellError
  71. Call %Temp%\Proj95_6.Cmd
  72. Del %Temp%\Proj95_6.Cmd >Nul: 2>&1
  73. Rem #########################################################################
  74. REM
  75. REM Copy dictionary into user directory.
  76. REM
  77. :CopyDictionary
  78. If Exist "%RootDrive%\Office95\%DictName%" goto Cont1
  79. If Not Exist "%Dictionary%" goto Cont1
  80. Copy "%Dictionary%" "%RootDrive%\Office95\%DictName%" >Nul: 2>&1
  81. :Cont1
  82. :Done