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.

142 lines
5.1 KiB

  1. @Echo Off
  2. Rem #########################################################################
  3. Rem
  4. Rem
  5. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  6. If "%_CHKROOT%" == "FAIL" Goto Done
  7. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  8. If "%_SETPATHS%" == "FAIL" Goto Done
  9. Rem #########################################################################
  10. Rem
  11. Rem Get the installation location of Microsoft FrontPage 98 from the registry. If
  12. Rem not found, assume Microsoft FrontPage 98 isn't installed and display a message.
  13. Rem
  14. ..\ACRegL %Temp%\FP98PATH.Cmd FP98PATH "HKLM\Software\Microsoft\FrontPage\3.0" "FrontPageRoot" ""
  15. If Not ErrorLevel 1 Goto Cont0
  16. Echo.
  17. Echo Unable to retrieve Microsoft FrontPage 98 installation location from the registry.
  18. Echo Verify that Microsoft FrontPage 98 has already been installed and run this script
  19. Echo again.
  20. Echo.
  21. Pause
  22. Goto Done
  23. :Cont0
  24. Call %Temp%\FP98PATH.Cmd
  25. Del %Temp%\FP98PATH.Cmd >Nul: 2>&1
  26. Rem #########################################################################
  27. Rem Ask if user really want to have per-user ClipArt
  28. Rem
  29. Echo.
  30. Echo In order to allow per user access to the ClipArt gallery,
  31. Echo all relevant files must be copied to each user's directory.
  32. Echo This will increase disk usage by about 2.1MEGs per user,
  33. Echo or by up to 17MEGs per user if additional ClipArt is installed.
  34. Echo.
  35. :Repeat
  36. set /p _FP98_OK_TO_CONTINUE_="Would you like to enable this feature (y/n)?"
  37. IF %_FP98_OK_TO_CONTINUE_%==N goto Skip1
  38. IF %_FP98_OK_TO_CONTINUE_%==n goto Skip1
  39. IF NOT %_FP98_OK_TO_CONTINUE_%==Y (
  40. IF NOT %_FP98_OK_TO_CONTINUE_%==y goto Repeat
  41. )
  42. Rem #########################################################################
  43. Rem
  44. Rem Change Registry Keys to make paths point to user specific
  45. Rem directories.
  46. Rem
  47. Rem First Create FPAGE98.key file
  48. Echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClipArt Gallery\2.0> FPAGE98.key
  49. Echo Database = REG_SZ "%RootDrive%\WINDOWS\artgalry.cag">> FPAGE98.key
  50. Echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClipArt Gallery\2.0\import\FrontPage Clip Art>> FPAGE98.key
  51. Echo CAG = REG_SZ "%RootDrive%\FrontPage98\clipart\clip1\fp98clp1.cag">> FPAGE98.key
  52. Rem
  53. Rem If Additional ClipArt is present it should be per-user too
  54. Rem
  55. ..\ACRegL %Temp%\FP98CLP2.Cmd FP98CLP2 "HKLM\SOFTWARE\Microsoft\ClipArt Gallery\2.0\import\FrontPage Clip Art2" "CAG" ""
  56. IF Not ErrorLevel 1 (
  57. set FP98CLP2=1
  58. del %Temp%\FP98CLP2.Cmd >Nul: 2>&1
  59. Echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClipArt Gallery\2.0\import\FrontPage Clip Art2>> FPAGE98.key
  60. Echo CAG = REG_SZ "%RootDrive%\FrontPage98\clipart\clip2\fp98clp2.cag">> FPAGE98.key
  61. ) ELSE (
  62. set FP98CLP2=0
  63. )
  64. regini FPAGE98.key > Nul:
  65. Rem #########################################################################
  66. Rem Create the user logon file
  67. Echo Rem >..\logon\FPG98USR.Cmd
  68. Rem #########################################################################
  69. Rem Create per user Clip Art directories
  70. Echo Rem >>..\logon\FPG98USR.Cmd
  71. Echo Rem Create a per user FrontPage 98 directory (FrontPage98)>>..\logon\FPG98USR.Cmd
  72. Echo Rem >>..\logon\FPG98USR.Cmd
  73. Echo If Exist %RootDrive%\FrontPage98 Goto Done>>..\logon\FPG98USR.Cmd
  74. Echo Rem >>..\logon\FPG98USR.Cmd
  75. Echo call TsMkUDir "%RootDrive%\FrontPage98\clipart\clip1">>..\logon\FPG98USR.Cmd
  76. Echo copy "%FP98PATH%\clipart\clip1\*" "%RootDrive%\FrontPage98\clipart\clip1">> ..\logon\FPG98USR.Cmd
  77. IF %FP98CLP2%==1 (
  78. Echo Rem >>..\logon\FPG98USR.Cmd
  79. Echo call TsMkUDir "%RootDrive%\FrontPage98\clipart\clip2">>..\logon\FPG98USR.Cmd
  80. Echo copy "%FP98PATH%\clipart\clip2\*" "%RootDrive%\FrontPage98\clipart\clip2">> ..\logon\FPG98USR.Cmd
  81. )
  82. Echo :Done >>..\logon\FPG98USR.Cmd
  83. Rem #########################################################################
  84. Rem
  85. Rem add FPG98USR.Cmd to the UsrLogn2.Cmd script
  86. Rem
  87. FindStr /I FPG98USR %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  88. If Not ErrorLevel 1 Goto Skip1
  89. Echo Call FPG98USR.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  90. :Skip1
  91. Rem #########################################################################
  92. Echo.
  93. Echo To insure proper operation of Microsoft FrontPage 98, users who are
  94. Echo currently logged on must log off and log on again before
  95. Echo running Microsoft FrontPage 98.
  96. Echo.
  97. Echo Microsoft Microsoft FrontPage 98 Multi-user Application Tuning Complete
  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