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.

100 lines
2.9 KiB

  1. @Echo Off
  2. Rem #########################################################################
  3. Rem
  4. Rem Verify that %RootDrive% has been configured and set it for this script.
  5. Rem
  6. Call "%SystemRoot%\Application Compatibility Scripts\ChkRoot.Cmd"
  7. If "%_CHKROOT%" == "FAIL" Goto Done
  8. Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
  9. If "%_SETPATHS%" == "FAIL" Goto Done
  10. Rem #########################################################################
  11. ..\ACRegL "%Temp%\PB6.Cmd" PB6INST "HKCU\Software\ODBC\ODBC.INI\Powersoft Demo DB V6" "DataBaseFile" "STRIPCHAR\1"
  12. If Not ErrorLevel 1 Goto Cont0
  13. Echo.
  14. Echo Unable to retrieve PowerBuilder 6.0 installation location from the registry.
  15. Echo Verify that PowerBuilder 6.0 has already been installed and run this script
  16. Echo again.
  17. Echo.
  18. Pause
  19. Goto Done
  20. :Cont0
  21. Call "%Temp%\PB6.Cmd"
  22. Del "%Temp%\PB6.Cmd" >Nul: 2>&1
  23. Rem
  24. Rem Change Registry Keys to make paths point to user specific
  25. Rem directories.
  26. Rem
  27. Rem If not currently in Install Mode, change to Install Mode.
  28. Set __OrigMode=Install
  29. ChgUsr /query > Nul:
  30. if Not ErrorLevel 101 Goto Begin
  31. Set __OrigMode=Exec
  32. Change User /Install > Nul:
  33. :Begin
  34. ..\acsr "#ROOTDRIVE#" "%RootDrive%" Template\pwrbldr6.Key pwrbldr6.key
  35. regini pwrbldr6.key > Nul:
  36. Rem If original mode was execute, change back to Execute Mode.
  37. If "%__OrigMode%" == "Exec" Change User /Execute > Nul:
  38. Set __OrigMode=
  39. Rem #########################################################################
  40. Rem
  41. Rem Update PBld6Usr.Cmd to reflect actual installation directory and
  42. Rem add it to the UsrLogn2.Cmd script
  43. Rem
  44. ..\acsr "#INSTDIR#" "%PB6INST%" ..\Logon\Template\PBld6Usr.Cmd ..\Logon\PBld6Usr.cmd
  45. FindStr /I PBld6Usr %SystemRoot%\System32\UsrLogn2.Cmd >Nul: 2>&1
  46. If Not ErrorLevel 1 Goto Skip1
  47. Echo Call PBld6Usr.Cmd >> %SystemRoot%\System32\UsrLogn2.Cmd
  48. :Skip1
  49. Rem #########################################################################
  50. Echo.
  51. Echo To insure proper operation of PowerBuilder 6.0, users who are
  52. Echo currently logged on must log off and log on again before
  53. Echo running PowerBuilder 6.0.
  54. Echo.
  55. Echo PowerBuilder 6.0 Multi-user Application Tuning Complete
  56. Rem
  57. Rem Get the permission compatibility mode from the registry.
  58. Rem If TSUserEnabled is 0 we need to warn user to change mode.
  59. Rem
  60. ..\ACRegL "%Temp%\tsuser.Cmd" TSUSERENABLED "HKLM\System\CurrentControlSet\Control\Terminal Server" "TSUserEnabled" ""
  61. If Exist "%Temp%\tsuser.Cmd" (
  62. Call "%Temp%\tsuser.Cmd"
  63. Del "%Temp%\tsuser.Cmd" >Nul: 2>&1
  64. )
  65. If NOT %TSUSERENABLED%==0 goto SkipWarning
  66. Echo.
  67. Echo IMPORTANT!
  68. Echo Terminal Server is currently running in Default Security mode.
  69. Echo This application requires the system to run in Relaxed Security mode
  70. Echo (permissions compatible with Terminal Server 4.0).
  71. Echo Use Terminal Services Configuration to view and change the Terminal
  72. Echo Server security mode.
  73. Echo.
  74. :SkipWarning
  75. Pause
  76. :done