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.

93 lines
2.3 KiB

  1. @echo off
  2. rem
  3. rem This batch file was written by the Hammer to enable OLE's
  4. rem 16bit to/from 32bit interop support.
  5. rem
  6. set windir=C:\WINDOWS
  7. if %1n==n goto Usage
  8. set windir=%1
  9. goto Start
  10. :Usage
  11. echo ����������������������������������������������������������������
  12. echo � Usage: OLE1632 win95dir
  13. echo � Example: OLE1632 C:\WINDOWS
  14. echo ����������������������������������������������������������������
  15. goto Done
  16. :Start
  17. if exist ole1632.bat goto ThunkToggle
  18. echo Must run from the SDK\Samples\Ole\Interop directory.
  19. goto Done
  20. :ThunkToggle
  21. @echo This batch file will enable or disable OLE2 16:32 interop.
  22. CHOICE.COM /C:EDC "Enable, Disable or Cancel"
  23. if ERRORLEVEL 3 goto Done
  24. if ERRORLEVEL 2 goto ThunkOff
  25. :ThunkOn
  26. @del %windir%\system\compobj.dll
  27. if exist %windir%\system\compobj.dll goto Reboot
  28. del %windir%\system\storage.dll
  29. del %windir%\system\ole2.dll
  30. del %windir%\system\ole2prox.dll
  31. del %windir%\system\ole2disp.dll
  32. del %windir%\system\ole2nls.dll
  33. del %windir%\system\stdole.tlb
  34. del %windir%\system\typelib.dll
  35. copy compobj.dll %windir%\system
  36. copy storage.dll %windir%\system
  37. copy ole2.dll %windir%\system
  38. copy ole2prox.dll %windir%\system
  39. copy ole2disp.dll %windir%\system
  40. copy ole2nls.dll %windir%\system
  41. copy stdole.tlb %windir%\system
  42. copy typelib.dll %windir%\system
  43. @echo OLE 16:32 interop has been enabled.
  44. goto Done
  45. :ThunkOff
  46. @del %windir%\system\compobj.dll
  47. if exist %windir%\system\compobj.dll goto Reboot
  48. del %windir%\system\storage.dll
  49. del %windir%\system\ole2.dll
  50. del %windir%\system\ole2prox.dll
  51. del %windir%\system\ole2disp.dll
  52. del %windir%\system\ole2nls.dll
  53. del %windir%\system\stdole.tlb
  54. del %windir%\system\typelib.dll
  55. copy compobj.w16 %windir%\system\compobj.dll
  56. copy storage.w16 %windir%\system\storage.dll
  57. copy ole2.w16 %windir%\system\ole2.dll
  58. copy ole2disp.w16 %windir%\system\ole2disp.dll
  59. copy ole2prox.w16 %windir%\system\ole2prox.dll
  60. copy ole2nls.w16 %windir%\system\ole2nls.dll
  61. copy stdole.w16 %windir%\system\stdole.tlb
  62. copy typelib.w16 %windir%\system\typelib.dll
  63. start /w regedit /s interop.reg
  64. echo OLE 16/32 interop has been disabled.
  65. goto Done
  66. :Reboot
  67. echo The 16bit OLE DLL's are busy, please reboot and run OLE1632 again.
  68. :Done