Verifying Installation Environments
by Christopher J. Trueman


Listing One
(a)
[Main]
Title=Killer App 2.2
Copyright=Copyright (C) 2001 Wave Software Limited.  All Rights Reserved.
DetailsRoot=html
RegistryKey=software\wavesoftware\killerapp\2.2\install

(b)
[W2K]
Test001=RAM
Test002=CPUSPEED
Test003=FREEDISKSPACE
Test004=NETWORKCARD
Test005=SERVICEPACK
Test006=MDAC
Test007=REGISTRYFILE
Test008=SYSTEMFILE

(c) 
[REGISTRYFILE]
Name=Microsoft Internet Information Server
Type=7
RootKey=2
Key=software\microsoft\inetstp
Value=InstallPath
Data=inetinfo.exe
Search=
Replace=
Versions=4.2.622.1-4.2.690.1

Listing Two
class Test
{
public:
   enum TEST_STATUS {TS_OK, TS_LOW, TS_MED, TS_HIGH};
   Test();
   virtual ~Test();
public:         // Operations
   virtual bool initialise(const stringmap& data);
   virtual bool verify() = 0;
public:         // Mutators
   void setName(const std::string& name);
   void setDisplayName(const std::string& displayName);
public:         // Accessors
   const std::string& getName();
   const std::string& getDisplayName();
   TEST_STATUS getStatus();
   const std::string& getStatusMsg();
protected:
   void setStatus(TEST_STATUS status);
   void setStatusMsg(const std::string& msg);
private:
   std::string m_Name;
   std::string m_DisplayName;
   TEST_STATUS m_Status;
   std::string m_StatusMsg;
};

Listing Three
   typedef Test* (*TESTCREATEFUNC)(const stringmap& data);
   typedef struct tagTESTENTRY
   {
      int type;
      TESTCREATEFUNC func;
   } TESTENTRY;

   TESTENTRY g_Tests[] =
   {
      { 0, createNull },
      { 1, createRam },
      { 2, createCpuSpeed },
      { 3, createDiskFreespace },
      { 4, createNetworkCard },
      { 5, createServicePack },
      { 6, createMDAC },
      { 7, createRegistryFile },
      { 8, createSystemFile }
   };





2

