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.

80 lines
1.8 KiB

  1. //
  2. // custom.h
  3. // TS client MSI custom action
  4. //
  5. //
  6. #include <windows.h>
  7. #include <tchar.h>
  8. #include <netcfgx.h>
  9. #include <devguid.h>
  10. #include <msi.h>
  11. #include <msiquery.h>
  12. #include "resource.h"
  13. #include <shlobj.h>
  14. #define STRSAFE_NO_DEPRECATE
  15. #include <strsafe.h>
  16. //
  17. // uwrap has to come after the headers for ANY wrapped
  18. // functions
  19. //
  20. #ifdef UNIWRAP
  21. #include "uwrap.h"
  22. #endif
  23. //
  24. // Custom actions.
  25. //
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. UINT __stdcall RDCSetupInit(MSIHANDLE hInstall);
  30. UINT __stdcall RDCSetupPreInstall(MSIHANDLE hInstall);
  31. UINT __stdcall RDCSetupPostInstall(MSIHANDLE hInstall);
  32. UINT __stdcall RDCSetupCheckOsVer(MSIHANDLE hInstall);
  33. UINT __stdcall RDCSetupCheckTcpIp(MSIHANDLE hInstall);
  34. UINT __stdcall RDCSetupBackupRegistry(IN MSIHANDLE hInstall);
  35. UINT __stdcall RDCSetupRestoreRegistry(IN MSIHANDLE hInstall);
  36. UINT __stdcall RDCSetupResetShortCut(MSIHANDLE hInstall);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #define SIZECHAR(x) sizeof(x)/sizeof(TCHAR)
  41. //
  42. // Helper functions.
  43. //
  44. HRESULT CheckNt5TcpIpInstalled();
  45. BOOL IsProductInstalled(MSIHANDLE hInstall);
  46. BOOL CheckComctl32Version();
  47. UINT RDCSetupModifyDir(MSIHANDLE hInstall);
  48. BOOL RDCSetupRunMigration(MSIHANDLE hInstall);
  49. #if DBG
  50. #define TRC_ERROR _T("ERROR: ")
  51. #define TRC_INFO _T("INFO: ")
  52. #define TRC_SYSTEM_ERROR _T("System Error: ")
  53. #define TRC_WARN _T("WARNING: ")
  54. #define TRC_DEBUG TRC_DEBUG_FUNC
  55. void TRC_DBG_SYSTEM_ERROR();
  56. void TRC_DEBUG_FUNC(TCHAR *szErrorLevel, TCHAR *szStr, ...);
  57. #else // DBG
  58. #define TRC_ERROR _T("")
  59. #define TRC_INFO _T("")
  60. #define TRC_SYSTEM_ERROR _T("")
  61. #define TRC_WARNING _T("")
  62. #define TRC_DEBUG
  63. #define TRC_DBG_SYSTEM_ERROR()
  64. #endif // DBG