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.

81 lines
2.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // helper.h
  7. //
  8. // Description:
  9. //
  10. // [Implementation Files:]
  11. // helper.cpp
  12. //
  13. // History:
  14. // Travis Nielsen travisn 13-AUG-2001 Created
  15. // Travis Nielsen travisn 20-AUG-2001 Added tracing functions
  16. //
  17. //
  18. /////////////////////////////////////////////////////////////////////////
  19. #pragma once
  20. #include <string>
  21. #include "stdafx.h"
  22. #include "sainstallcom.h"
  23. #include <msi.h>
  24. #include <setupapi.h> // SetupPromptForDiskW
  25. #include "SaInstall.h"
  26. //Use the std namespace from <string> for using wstring
  27. using namespace std;
  28. //
  29. // Product ID Code defined in the MSI used to detect if components are
  30. // installed
  31. //
  32. const LPCWSTR SAK_PRODUCT_CODE = L"{A4F8313B-0E21-478B-B289-BFB7736CA7AA}";
  33. /////////////////////////////////////////////////////////////////////////
  34. // Function definitions
  35. /////////////////////////////////////////////////////////////////////////
  36. /////////////////////////////////////////////////////////////////////////
  37. BOOL GetRegString(
  38. const HKEY hKey, //[in] Key to look up in the registry
  39. const LPCWSTR wsSubKey, //[in] Subkey to look up
  40. const LPCWSTR wsValName,//[in] Value name
  41. wstring& wsVal); //[out] Return data for this registry entry
  42. /////////////////////////////////////////////////////////////////////////
  43. void AppendPath(wstring &wsPath,//[in, out] Path on which to append the other path
  44. LPCWSTR wsAppendedPath);//[in] Path to be appended
  45. /////////////////////////////////////////////////////////////////////////
  46. BOOL bSAIsInstalled(const SA_TYPE installType);
  47. /////////////////////////////////////////////////////////////////////////
  48. HRESULT GetInstallLocation(
  49. wstring &wsLocationOfSaSetup);// [out] expected path to SaSetup.msi
  50. /////////////////////////////////////////////////////////////////////////
  51. HRESULT CreateHiddenConsoleProcess(
  52. const wchar_t *wsCommandLine);//[in] Command line to execute
  53. /////////////////////////////////////////////////////////////////////////
  54. void ReportError(BSTR *pbstrErrorString, //[out] error string
  55. const VARIANT_BOOL bDispError, //[in] display error dialogs
  56. const unsigned int errorID); //[in] ID from resource strings
  57. /////////////////////////////////////////////////////////////////////////
  58. void TestWebSites(const VARIANT_BOOL bDispError, //[in] Display error dialogs?
  59. BSTR* pbstrErrorString);//[in, out] Error string
  60. /////////////////////////////////////////////////////////////////////////
  61. BOOL InstallingOnNTFS();