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.

157 lines
4.4 KiB

  1. @Echo Off
  2. Cls
  3. Rem #########################################################################
  4. Rem
  5. Rem Verify that %ROOTDRIVE% has been configured and set it for this script.
  6. Rem
  7. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  8. If "%_CHKROOT%" == "FAIL" Goto Done
  9. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  10. If "%_SETPATHS%" == "FAIL" Goto Done
  11. Rem #########################################################################
  12. Rem
  13. Rem Get the installation location of Visio from the registry
  14. Rem Multiple versions of Visio : Standard/Technical/Professional
  15. Rem
  16. Set VisioVer=Standard
  17. ..\ACRegL %Temp%\Vso.cmd VSO5INST "HKLM\Software\Visio\Visio Standard\5.0" "InstallDir" ""
  18. If Not ErrorLevel 1 Goto Cont0
  19. Set VisioVer=Technical
  20. ..\ACRegl %Temp%\Vso.cmd VSO5INST "HKLM\Software\Visio\Visio Technical\5.0" "InstallDir" ""
  21. If Not ErrorLevel 1 Goto Cont0
  22. Set VisioVer=Professional
  23. ..\ACRegl %Temp%\Vso.cmd VSO5INST "HKLM\Software\Visio\Visio Professional\5.0" "InstallDir" ""
  24. If Not ErrorLevel 1 Goto Cont0
  25. Set VisioVer=Enterprise
  26. ..\ACRegl %Temp%\Vso.cmd VSO5INST "HKLM\Software\Visio\Visio Enterprise\5.0" "InstallDir" ""
  27. If Not ErrorLevel 1 Goto Cont0
  28. Set VisioVer=TechnicalPlus
  29. ..\ACRegl %Temp%\Vso.cmd VSO5INST "HKLM\Software\Visio\Visio Technical 5.0 Plus\5.0" "InstallDir" ""
  30. If Not ErrorLevel 1 Goto Cont0
  31. Set VisioVer=ProfessionalAndTechnical
  32. ..\ACRegl %Temp%\Vso.cmd VSO5INST "HKLM\Software\Visio\Visio Professional and Technical\5.0" "InstallDir" ""
  33. If Not ErrorLevel 1 Goto Cont0
  34. Rem
  35. Rem Failed to retrieve installed version
  36. Rem
  37. Echo.
  38. Echo Unable to retrieve Visio 5.0 installation location from the registry.
  39. Echo Verify that Visio 5.0 has already been installed and run this script again
  40. Echo.
  41. Pause
  42. Goto Done
  43. Rem
  44. Rem set VSO5INST variable to Visio install dir
  45. Rem
  46. :Cont0
  47. Call %Temp%\Vso.cmd
  48. Del %Temp%\Vso.cmd >NUL: 2>&1
  49. Rem
  50. Rem Display which version is installed
  51. Rem
  52. Echo.
  53. Echo Application Tuning detected version Visio %VisioVer%
  54. Echo.
  55. Rem
  56. Rem Set the save directory to per-user My Documents
  57. Rem Instead of Installing user My Documents
  58. Rem
  59. ..\Aciniupd /e "%VSO5INST%\System\Visio.ini" "Application" "DrawingsPath" "%ROOTDRIVE%\%MY_DOCUMENTS%"
  60. Rem
  61. Rem Custom Dictionary management
  62. Rem If a version of Office is installed, set Visio.ini entry to point to Office custom.dic
  63. Rem Otherwise, set it to APP_DATA
  64. Rem
  65. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Office\9.0\Common\InstallRoot" "" ""
  66. If Not ErrorLevel 1 Goto Off2000
  67. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Office\8.0\Common\InstallRoot" "" ""
  68. If Not ErrorLevel 1 Goto Off97
  69. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRoot" "" ""
  70. If Not ErrorLevel 1 Goto Off95
  71. ..\ACRegL %Temp%\Off.Cmd OFFINST "HKLM\Software\Microsoft\Microsoft Office\95\InstallRootPro" "" ""
  72. If Not ErrorLevel 1 Goto Off95
  73. Rem If we get here, no Office version installed
  74. Set CustomDicPath=%ROOTDRIVE%\%APP_DATA%
  75. goto SetCusIni
  76. :Off2000
  77. Rem Office 2000 installed
  78. set CustomDicPath=%ROOTDRIVE%\%APP_DATA%\Microsoft\Proof
  79. goto SetCusIni
  80. :Off97
  81. Rem Office97 Installed
  82. set CustomDicPath=%ROOTDRIVE%\Office97
  83. goto SetCusIni
  84. :Off95
  85. Rem Office95 installed
  86. Set CustomDicPath=%ROOTDRIVE%\Office95
  87. :SetCusIni
  88. Rem Change User Custom Dictionary entry in Visio.ini according
  89. Rem to our policy
  90. ..\Aciniupd /e "%VSO5INST%\System\Visio.ini" "Application" "UserDictionaryPath1" "%CustomDicPath%\Custom.Dic"
  91. Set CustomDicPath=
  92. Rem
  93. Rem Successful termination
  94. Rem
  95. Echo.
  96. Echo Visio 5.0 Multi-User Application Tuning Complete
  97. Echo.
  98. Rem
  99. Rem Get the permission compatibility mode from the registry.
  100. Rem If TSUserEnabled is 0 we need to warn user to change mode.
  101. Rem
  102. ..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
  103. If Exist "%Temp%\tsuser.Cmd" (
  104. Call "%Temp%\tsuser.Cmd"
  105. Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
  106. )
  107. If NOT %TSUSERENABLED%==0 goto SkipWarning
  108. Echo.
  109. Echo IMPORTANT!
  110. Echo Terminal Server is currently running in Default Security mode.
  111. Echo This application requires the system to run in Relaxed Security mode
  112. Echo (permissions compatible with Terminal Server 4.0).
  113. Echo Use Terminal Services Configuration to view and change the Terminal
  114. Echo Server security mode.
  115. Echo.
  116. :SkipWarning
  117. Pause
  118. :Done