Building OpenPegasus Installable using Inno 2 scripts
-----------------------------------------------------

1. Download and install  Inno Setup 2.For more information or download of Inno Setup please refer to (http://gnuwin.epfl.ch/apps/innosetup/en/index.html) or 
(http://www.jrsoftware.org/).
These scripts should be compatible with other version of inno setup as well but it has been as such tested with Inno Setup 4.2.1 version (isetup-4.2.1). 

2. Once Inno Setup 2 is installed , an add on i.e Inno Setup Preprocessor (ISPP) should be installed . This ISPP is a part of and can be installed by downloading Inno setup QuickStart Pack 4.2.0(ispack-4.2.0.exe). With ISPP installed many other things like conditional compilation of parts of script, using compile time variables , using functions which can read from registry or INI files . See http://ispp.sf.netfor more information. Since this script uses Registry functions and compile time variables , this scripts will not get compiled unless Inno Setup 2 basic framework is accompanied by ISPP.

3. Please note that OpenPegasus installable can be generated by a person using these scripts only if his/her system has the development environment set and pegasus built on windows 2000.

This is because it uses the Registry keys paths for a windows 2000 system. In case you are building it on any other version of windows , the registry paths should be accordingly updated. 

If you have pegasus built on a windows 2000 system, the  following things will be automatically set:

a)PEGASUS_HOME set where all the dlls and exe's of OpenPegasus are placed for e.g c:\PegasusBuild. This script will pick the value of PEGASUS_HOME from the environment settings using GetEnv function.

b)He will have Microsoft Microsoft Visual C++ .NET installed on his machine. Please note that this script is specific to creating an installer with Microsoft Visual C++.NET as it needs two system dlls ( named as msvcr71.dll and msvcp71.dll in Microsoft Visual C++ .Net which might not be named same in any other version of VC). Once a person installs Microsoft Visual C++ .Net, these two dlls are installed in the system32 directory under the SystemRoot folder . In turn this script picks them up from SystemRoot\System32 folder.

In case you have some other version of VC installed please find out the name of the corresponding dlls for your version of VC and replace the above two dlls in this script with your dlls and it should work.But it has been tested with Microsoft Visual C++ .Net only.

4. Once the above setup is complete , the script can be compiled by the Inno Setup compiler. After the compilation, it will create a new folder in the current working directory by the name "Output" and place the newly created "setup.exe" there.

This setup.exe is the pegasus installable and can be used to install openpegasus on a 
windows 2000 system. 

5. This script packages only a minimal number of dll's and exe's which makes it possible to run cimserver and its utilities.  Besides this only an additional provider dll has been added in the script to demonstration purpose. In case you wish to ship an extra dll or exe with the installble ( e.g an additional provider dll), the corresponding dll or exe should be added to the script under "Files" section and recompile the scripts.

At present this script is written to support strictly Pegasus 2.4. In case the installable is generated for any other version of pegasus , there might be some changes required like adding or deleting some more pegasus dlls's or exe's.


Installing OpenPegasus using above installable:
-------------------------------------------------
1. To test the OpenPegasus installable, copy the setup.exe to a system where OpenPegasus is not manually built as this script doesn't take into consideration if OpenPegasus is manually built.

2. Double click the setup.exe and follow the steps as mentioned.

3. After the OpenPegasus installation is over, you can either start cimserver as "cimserver -start" or through the System's Services if you have installed it as a windows service. If it hasn't been installed as windows service, then you can start it by just typing cimserver on command prompt.

4. To test if OpenPegasus is installed successfully, any of the seven utilities of OpenPegasus (cimprovider, cimuser, cimauth, cimserver, cimmof, cimmofl, cimconfig) can be run. For e.g cimprovider -l will list all modules loaded that time in the cimserver  and cimuser -a -s <username> will add the user to OpenPegasus.

5. You can also execute CIM operations using CLI , a client shipped with the installable. For e.g to enumerate all instances of CIM_OperatingSystem execute thhe following command on command prompt:
CLI ei CIM_OperatingSystem

For more help on CLI , please see CLI's help by executing CLI -h on the command prompt.

