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.

90 lines
2.3 KiB

  1. #ifndef _INITAPP_H_
  2. #define _INITAPP_H_
  3. typedef PVOID HINF;
  4. class CInitApp : public CObject
  5. {
  6. public:
  7. CInitApp();
  8. ~CInitApp();
  9. public:
  10. int m_err;
  11. HINSTANCE m_hDllHandle;
  12. HINF m_hInfHandle[MC_MAXMC];
  13. // machine status
  14. CString m_csMachineName;
  15. CString m_csSysDir;
  16. CString m_csSysDrive;
  17. CString m_csPathSource;
  18. CString m_csPathInetsrv;
  19. CString m_csPathInetpub;
  20. CString m_csPathMailroot;
  21. CString m_csPathNntpRoot;
  22. CString m_csPathNntpFile;
  23. BOOL m_fMailPathSet;
  24. BOOL m_fNntpPathSet;
  25. NT_OS_TYPE m_eNTOSType;
  26. OS m_eOS;
  27. BOOL m_fNT4; // TRUE if OS is NT
  28. BOOL m_fNT5; // TRUE if OS is NT
  29. BOOL m_fW95; // TRUE if OS is NT
  30. BOOL m_fTCPIP; // TRUE if TCP/IP is installed
  31. UPGRADE_TYPE m_eUpgradeType; // UT_NONE, UT_OLDFTP, UT_10, UT_20
  32. INSTALL_MODE m_eInstallMode; // IM_FRESH, IM_MAINTENANCE, IM_UPGRADE
  33. DWORD m_dwSetupMode;
  34. DWORD m_dwCompId; // Stores the current top-level component
  35. BOOL m_fWizpagesCreated; // TRUE if wizard pages already created
  36. BOOL m_fActive[MC_MAXMC][SC_MAXSC];
  37. INSTALL_MODE m_eState[SC_MAXSC];
  38. BOOL m_fValidSetupString[SC_MAXSC];
  39. BOOL m_fStarted[MC_MAXMC];
  40. // Some Specific flags set from ocmanage
  41. BOOL m_fNTUpgrade_Mode;
  42. BOOL m_fNTGuiMode;
  43. BOOL m_fNtWorkstation;
  44. BOOL m_fInvokedByNT; // superset of m_fNTGuiMode and ControlPanel which contains sysoc.inf
  45. BOOL m_fIsUnattended;
  46. BOOL m_fSuppressSmtp; // TRUE if another SMTP server is detected and we
  47. // should not install on top of it.
  48. ACTION_TYPE m_eAction; // AT_FRESH, AT_ADDREMOVE, AT_REINSTALL, AT_REMOVEALL, AT_UPGRADE
  49. CString m_csLogFileFormats;
  50. public:
  51. // Implementation
  52. public:
  53. BOOL InitApplication();
  54. BOOL GetMachineStatus();
  55. INSTALL_MODE DetermineInstallMode(DWORD dwComponent);
  56. BOOL GetLogFileFormats();
  57. private:
  58. BOOL GetMachineName();
  59. BOOL GetSysDirs();
  60. BOOL GetOS();
  61. BOOL GetOSVersion();
  62. BOOL GetOSType();
  63. BOOL SetInstallMode();
  64. BOOL DetectPreviousInstallations();
  65. BOOL CheckForADSIFile();
  66. BOOL VerifyOSForSetup();
  67. void SetSetupParams();
  68. };
  69. /////////////////////////////////////////////////////////////////////////////
  70. #endif // _INITAPP_H_