echo off
cls
REM
REM DIPTESTER Installation Script
Rem written by J.D. Smith, Principal Support Engineer, Oracle Support-Orlando

REM ########################################
REM ## Accept Input Variables From the User 
REM ########################################
echo.
echo PLEASE PROVIDE THE FOLLOWING VALUES NEEDED FOR INSTALLATION.  
echo (to override the default values in brackets just type in a new value.)
echo.
echo OID Information
echo ==================================
echo.
Set /P OIDHOST=Enter Your Hostname: %
echo.
Set /P ORACLE_HOME=Enter the Oracle Home(use double \\ for example: D:\\oracle\\asdb): %
echo.
Set /P ORACLE_SID=Enter the SID NAME of OID: %
echo.
Set /P OIDPORT=Enter the LDAP Port# of OID LDAP Server: %
echo.
Set /P OIDSSLPORT=Enter the SSL LDAP Port# of OID LDAP Server: %
echo.
Set /P RAC=IS OID / ODISRV Deployed in a RAC Environment [YES or NO]: %
echo.
Set /P OIDPWD=Enter the orcladmin Password: %
echo.
echo The Default REALM is usually cn=users,dc=your domain.. 
echo     for example: cn=users,dc=mycompany,dc=com
echo.
Set /P REALM=Enter the OID container to sync (REALM): %
echo.

set PROV=0

echo.
  echo Available DIP Connectors
  echo ========================
  echo 0) Database Connector
  echo 1) Iplanet/SunOne
  echo 2) Microsoft Active Directory
  echo 3) Novell eDirectory
  echo 4) Portal Provisioning Agent
  echo 5) Collabsuite Provisioning Agent
  echo 6) eBusiness Provisioning Agent
REM  echo D) Novell eDirectory
echo.

Set /P DIPCON=Enter DIP Connector to Configure/Test:  %

if "%DIPCON%" =="0" goto odb
if "%DIPCON%" =="1" goto sun1
if "%DIPCON%" =="2" goto adir
if "%DIPCON%" =="3" goto edir
if "%DIPCON%" =="4" goto port
if "%DIPCON%" =="5" goto coll
if "%DIPCON%" =="6" goto ebiz
goto bottom


:odb
echo Using Oracle Database Connector
  echo =======================================
  echo.

set  CONN=dbconnector
set  CONNID=Oracle Database Connector
set  IPROFILE=DBImport
set  EPROFILE=DBExport
set  IMPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\dbsync\\DBImport.map
set  EXPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\dbsync\\DBExport.map
echo.
set /P DBCONN_STR=Enter the %CONNID% Database JDBC Connect String: %
echo.
Set /P DBUSER=Enter Database User Name: %
echo.
set /P DBPASS=Enter the Database User Password: %
echo.

goto End
:sun1
echo Using SunONE/iPlanet Directory Server
echo =======================================
set CONNID=SunONE/iPlanet Directory Server
set IPROFILE=IplanetImport
set EPROFILE=IplanetExport
set IMPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\iplsync\\iplanetimp.map
set EXPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\iplsync\\iplanetexp.map
set BSCFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\iplsync\\ipl2oid.properties
echo.
echo %CONNID% Ldap Server Information
echo =========================================================
set /P LDAPHOST=Enter the Hostname of the LDAP Server: %
echo.
set /P LDAPPORT=Enter the LDAP Port# of the LDAP Server: %
echo.
set /P LDAPSSLPORT=Enter the LDAP SSL Port# of the LDAP Server: %
echo.
set /P LDAPCTX=Enter root container of entries to be synchronized: %
echo.
set /P LDAPADMIN=Enter the Connection DN of the LDAP Server: %
echo.
set /P LDAPPWD=Enter the LDAP Connection DN Password: %
echo.
echo dipassistant mp -host %OIDHOST% -port %OIDPORT% -dn cn=orcladmin -passwd %OIDPWD% -profile %IPROFILE% odip.profile.condirpassword=%LDAPPWD%
call dipassistant mp -host %OIDHOST% -port %OIDPORT% -dn cn=orcladmin -passwd %OIDPWD% -profile %IPROFILE% odip.profile.condirpassword=%LDAPPWD%



goto End


:adir
echo Using Microsoft Active Directory Connector
echo =======================================
set CONNID=Microsoft Active Directory
set IPROFILE=ActiveChgImp
set EPROFILE=ActiveExport
set IMPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\adsync\\activechg.map
set EXPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\adsync\\activeexp.map
set BSCFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\adsync\\ad2oid.properties
echo.
echo %CONNID% Ldap Server Information
echo =========================================================
set /P LDAPHOST=Enter the Hostname of the LDAP Server: %
echo.
set /P LDAPPORT=Enter the LDAP Port# of the LDAP Server: %
echo.
set /P LDAPSSLPORT=Enter the LDAP SSL Port# of the LDAP Server: %
echo.
set /P LDAPCTX=Enter root container of entries to be synchronized: %
echo.
set /P LDAPADMIN=Enter the Connection DN of the LDAP Server: %
echo.
set /P LDAPPWD=Enter the LDAP Connection DN Password: %
echo.
echo dipassistant mp -host %OIDHOST% -port %OIDPORT% -dn cn=orcladmin -passwd %OIDPWD% -profile %IPROFILE% odip.profile.condirpassword=%LDAPPWD%
call dipassistant mp -host %OIDHOST% -port %OIDPORT% -dn cn=orcladmin -passwd %OIDPWD% -profile %IPROFILE% odip.profile.condirpassword=%LDAPPWD%


goto End


:edir
echo Using Novell eDirectory Directory Server
  echo =======================================
  echo.
  echo This Connector Is Not Available Yet

set CONNID=Novell eDirectory LDAP Server
set IPROFILE=eDirectoryImp
set EPROFILE=eDirectoryExp
set IMPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\edirsync\\edirectoryimp.map
set EXPFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\edirsync\\edirectoryexp.map
set BSCFILE=%ORACLE_HOME%\\ldap\\odi\\diptester\\edirsync\\edir2oid.properties
echo.
echo %CONNID% Ldap Server Information
echo =========================================================
set /P LDAPHOST=Enter the Hostname of the LDAP Server: %
echo.
set /P LDAPPORT=Enter the LDAP Port# of the LDAP Server: %
echo.
set /P LDAPSSLPORT=Enter the LDAP SSL Port# of the LDAP Server: %
echo.
set /P LDAPCTX=Enter root container of entries to be synchronized: %
echo.
set /P LDAPADMIN=Enter the Connection DN of the LDAP Server: %
echo.
set /P LDAPPWD=Enter the LDAP Connection DN Password: %
echo.
echo dipassistant mp -host %OIDHOST% -port %OIDPORT% -dn cn=orcladmin -passwd %OIDPWD% -profile %IPROFILE% odip.profile.condirpassword=%LDAPPWD%
call dipassistant mp -host %OIDHOST% -port %OIDPORT% -dn cn=orcladmin -passwd %OIDPWD% -profile %IPROFILE% odip.profile.condirpassword=%LDAPPWD%

goto End





:port
  echo Configuring Portal Applications Provisioning
  echo ===============================================
  echo.

set  CONNID=Portal Applications Provisioning
set  PROV=1
set  PPROFILE= 
set  PROVAPPDN= 
set  IMPFILE= 
set  EXPFILE= 
set  EXPFILE= 
echo Current Provisioning Profiles: 
ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %OIDPWD% -b "cn=provisioning Profiles,cn=changelog subscriber,cn=oracle internet directory" -s sub "objectclass=*" orclodipprovisioningappname orclodipprovisioningorgname 
echo.
echo -------------------------------------------------------------------------------------
echo.
echo Locate Name of Provisioning Profile from the above list...
echo   for examples:
echo   orclODIPProfileName=xxxxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyy
echo .
set /P PPROFILE=Enter Value for Provisioning Profile Name: %
echo.

goto End


:coll
  echo Configuring CollabSuite Applications Provisioning
  echo ===============================================
  echo.

set  CONNID=Collabsuite Applications Provisioning
set  PROV=1
set  PPROFILE= 
set  PROVAPPDN= 
set  IMPFILE= 
set  EXPFILE= 
set  EXPFILE= 
echo Current Provisioning Profiles: 
ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %OIDPWD% -b "cn=provisioning Profiles,cn=changelog subscriber,cn=oracle internet directory" -s sub "objectclass=*" orclodipprovisioningappname orclodipprovisioningorgname 
echo.
echo -------------------------------------------------------------------------------------
echo.
echo Locate Name of Provisioning Profile from the above list...
echo   Examples of a Valid Profile Name:
echo   orclODIPProfileName=xxxxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyy
echo                                   or
echo   cn=OIDToApplication,orclODIPProfileName=xxxxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyy
echo .
set /P PPROFILE=Enter Value for Provisioning Profile Name: %
echo.


echo.
ldapsearch -h %OIDHOST% -p %OIDPORT%  -D cn=orcladmin -w %OIDPWD% -b "cn=Products,cn=oraclecontext,%DEFSUB%" -s one "objectclass=*" orclodipprovisioningappname
echo --------------------------------------------------------------------------------------------
echo.
echo.
echo Locate The Full DN of the Application from the above list..
echo   For Example:  orclApplicationCommonName=Wireless,cn=Products,cn=OracleContext,dc=acme,dc=com
set /P PPROFILE=Enter Full DN of the Application: %
echo.

goto End


:ebiz
  echo Configuring eBusiness Applications Provisioning
  echo ===============================================
  echo.

set  CONNID=eBusiness Applications Provisioning
set  PROV=1
set  PPROFILE= 
set  PROVAPPDN= 
set  IMPFILE= 
set  EXPFILE= 
set  EXPFILE= 
echo Current Provisioning Profiles: 
ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %OIDPWD% -b "cn=provisioning Profiles,cn=changelog subscriber,cn=oracle internet directory" -s sub "objectclass=*" orclodipprovisioningappname orclodipprovisioningorgname 
echo.
echo -------------------------------------------------------------------------------------
echo.
echo Locate Name of Provisioning Profile from the above list...
echo   Examples of a Valid Profile Name:
echo   orclODIPProfileName=xxxxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyy
echo                                   or
echo   cn=OIDToApplication,orclODIPProfileName=xxxxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyy
echo .
set /P PPROFILE=Enter Value for Provisioning Profile Name: %
echo.


echo.
ldapsearch -h %OIDHOST% -p %OIDPORT%  -D cn=orcladmin -w %OIDPWD% -b "cn=EBusiness,cn=Products,cn=oraclecontext,%DEFSUB%" -s one "objectclass=*" orclodipprovisioningappname
echo --------------------------------------------------------------------------------------------
echo.
echo.
echo Locate The Full DN of the Application from the above list..
echo   For Example:  orclApplicationCommonName=Prod1,cn=EBusiness,cn=Products,cn=OracleContext,dc=acme,dc=com
set /P PPROFILE=Enter Full DN of the Application: %
echo.
echo.
set /P DBCONN_STR=Enter the %CONNID% Database JDBC Connect String: %
echo.
Set /P DBUSER=Enter Database User Name: %
echo.
set /P DBPASS=Enter the Database User Password: %
echo.


goto End



:End
CLS
echo ========================================== 
echo       CONFIGURATION SETTINGS SUMMARY
echo.
echo OID CONNECTION INFO
echo ------------------- 
echo ORACLE HOME:  %ORACLE_HOME%
echo ORACLE SID:  %ORACLE_SID%
echo OID/LDAP SERVER HOST:  %OIDHOST%
echo OID PORT NUMBER:  %OIDPORT%
echo OID ADMIN PASSWORD:  %OIDPWD%
echo OID Identity Management Realm: %REALM%
echo.
echo CONNECTOR INFO FOR:  %CONNID%
echo ------------------------------------------------------- 
echo If This is a Provisioning Profile...
echo PROFILE NAME: %PPROFILE%
echo.
echo If This is an LDAP Synchronization Profile...
echo HOSTNAME:  %LDAPHOST%
echo LDAP PORT:  %LDAPPORT%
echo ADMIN USER:  %LDAPADMIN%
echo ADMIN USER PASSWORD:  %LDAPPWD%
echo Root container of entries to be synchronized:  %LDAPCTX%
echo.
echo Import Profile Map:  %IMPFILE%
echo Export Profile Map:  %EXPFILE%
echo Profile Loads to Configset:  %CONFIGSET%
echo Instance Running DIP Synch:  %INSTANCE%
echo.
echo DATABASE CONNECTION INFO: 
echo ________________________________
echo Database SID %DBSID%
echo Database User Name (DBUSER): %DBUSER%
echo Database User Password (DBPASS): %DBPASS%
echo.
echo.
echo ========================================== 
echo.
set /P ANS=Review the Above Settings, press Enter key to continue... %

echo ####################################################################>diptester.properties
echo ## This file contains information required to create a diptester  ##>>diptester.properties
echo ## profile used to configure and test a DIP synch profile.        ##>>diptester.properties
echo ##                                                                ##>>diptester.properties
echo ## The filename MUST begin with diptester and end with .properties##>>diptester.properties
echo ## For example:  diptester.properties, diptester-myAD.ini,        ##>>diptester.properties
echo ##                                                                ##>>diptester.properties
echo ## DO NOT CONFUSE THIS PROFFILE WITH A DIP CONNECTOR PROFILE, this ##>>diptester.properties
echo ## profile is used to control the behavior of DIPTESTER only it   ##>>diptester.properties
echo ## does nothing to a DIP synch connector's profile.               ##>>diptester.properties
echo ####################################################################>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # CONNID must contain the name of the Connector>>diptester.properties
echo #>>diptester.properties
echo # valid values are:>>diptester.properties
echo #>>diptester.properties
echo # CONNID = Microsoft Active Directory>>diptester.properties
echo # CONNID = SunOne Directory Server>>diptester.properties
echo # CONNID = Novell eDirectory Server>>diptester.properties
echo # CONNID = Oracle Database Connector>>diptester.properties
echo # CONNID = Oracle Provisioning Agent>>diptester.properties
echo.>>diptester.properties
echo CONNID = %CONNID%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # ORACLE_HOME and ORACLE SID: The absolute path of your ORACLE containing >>diptester.properties
echo # a DIP synch profile and the ORACLE_SID used to connect>>diptester.properties
echo #>>diptester.properties
echo # NOTE - on windows you must escape the \ slashes.. for example:>>diptester.properties
echo #     >>diptester.properties
echo #ORACLE_HOME = D:\\oracle\\asdb>>diptester.properties
echo ORACLE_HOME = %ORACLE_HOME%>>diptester.properties
echo.>>diptester.properties
echo ORACLE_SID = %ORACLE_SID%>>diptester.properties
echo.>>diptester.properties
echo #>>diptester.properties
echo # OIDHOST that is running the odisrv process used for DIP synch>>diptester.properties
echo # can be simple hostname if your DNS can resolve it this way>>diptester.properties
echo # otherwise add domain name>>diptester.properties
echo.>>diptester.properties
echo #OIDHOST = myhost.mydomain.com>>diptester.properties
echo OIDHOST = %OIDHOST%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # OIDPORT for the odisrv non SSL communication to the oidldapd process>>diptester.properties
echo # This is usually the port listed in the default configset of the directory >>diptester.properties
echo # server, but can be any user defined configset ldap port.>>diptester.properties
echo.>>diptester.properties
echo OIDPORT = %OIDPORT%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # OIDSSLPORT for the odisrv SSL communication to the oidldapd process>>diptester.properties
echo # This must be an LDAP port that has been configured for SSL with a WALLET if>>diptester.properties
echo # you are planning on running the odisrv in authmode 2.  Otherwise use the>>diptester.properties
echo # ssl port of the default configset of the directory server>>diptester.properties
echo.>>diptester.properties
echo OIDSSLPORT = %OIDSSLPORT%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # SSLAUTH is used to define whether the odiserv is to use SSL when communicating>>diptester.properties
echo # with the oidldapd server>>diptester.properties
echo.>>diptester.properties
type x>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # RAC = YES denotes OID/OIDSRV is running in a RAC environment.>>diptester.properties
echo # If this value is set to YES, then the oidctl command will include the host=<virtual host> when>>diptester.properties
echo # starting and stopping the odisrv process.>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo RAC = %RAC%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # REALM is the OID container where you are syncing TO in an Import profile or >>diptester.properties
echo # synching FROM in an Export profile.>>diptester.properties
echo #>>diptester.properties
echo.>>diptester.properties
echo REALM = %REALM%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # LDAPHOST is the host that you are synching from / to.  You must ensure that you>>diptester.properties
echo # have connectivity to this host for LDAP operations.  It can be simple hostname if >>diptester.properties
echo # your DNS can resolve it this way otherwise add domain name>>diptester.properties
echo.>>diptester.properties
echo LDAPHOST = %LDAPHOST%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # LDAPPORT is the LDAP port that the DIP connector will use to communicate with >>diptester.properties
echo # the 3rd party directory server for non SSL communication.>>diptester.properties
echo.>>diptester.properties
echo LDAPPORT = %LDAPPORT%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # LDAPSSLPORT is the LDAP port that the DIP connector will use to communicate with >>diptester.properties
echo # the 3rd party directory server for SSL communication.  If you need to run the >>diptester.properties
echo # odisrv authmode 2 you MUST set up your local wallet to contain the certificate of>>diptester.properties
echo # the remote root certificate authority and you must configure your odi.properties>>diptester.properties
echo # file in the $ORACLE_HOME/ldap/odi/conf directory.>>diptester.properties
echo #>>diptester.properties
echo # Even though you may not be running the odisrv in SSL mode this value must still>>diptester.properties
echo # contain the ssl port of the remote LDAP server.>>diptester.properties
echo.>>diptester.properties
echo LDAPSSLPORT = %LDAPSSLPORT%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # LDAPDMIN is the account name the DIP connector will use to connect to the remote>>diptester.properties
echo # LDAP server, for example:>>diptester.properties
echo #>>diptester.properties
echo # on an Active Directory Server: LDAPADMIN = administrator@acme.com>>diptester.properties
echo #>>diptester.properties
echo # on a SunOne Directory Server: LDAPDMIN = cn=Directory Manager>>diptester.properties
echo #>>diptester.properties
echo.>>diptester.properties
echo LDAPADMIN = %LDAPADMIN%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # LDAPCTX is the the container on the 3rd party directory where you are synching FROM>>diptester.properties
echo # in an Import profile or synching TO in an Export profile.>>diptester.properties
echo #>>diptester.properties
echo.>>diptester.properties
echo LDAPCTX = %LDAPCTX%>>diptester.properties
echo.>>diptester.properties
echo # PPROFILE is the name of the PROVISIONING profile you are configuring and/or testing>>diptester.properties
echo #>>diptester.properties
echo PPROFILE = %PPROFILE%>>diptester.properties
echo.>>diptester.properties
echo # PROVAPPDN is the dn as in the application entry under cn=(app),cn=products,cn=oraclecontext>>diptester.properties
echo PROVAPPDN = %PROVAPPDN%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # IPROFILE is the name of the IMPORT profile you are configuring and/or testing>>diptester.properties
echo #>>diptester.properties
echo # standard profiles shipped with OID are:>>diptester.properties
echo #>>diptester.properties
echo # ActiveImport>>diptester.properties
echo # ActiveChgImp>>diptester.properties
echo # IplanetImport>>diptester.properties
echo # LdifImport>>diptester.properties
echo # TaggedImport>>diptester.properties
echo.>>diptester.properties
echo IPROFILE = %IPROFILE%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # EPROFILE is the name of the EXPORT profile you are configuring and/or testing>>diptester.properties
echo #>>diptester.properties
echo #>>diptester.properties
echo # ActiveExport>>diptester.properties
echo # IplanetExport>>diptester.properties
echo # LdifExport>>diptester.properties
echo # TaggedExport>>diptester.properties
echo.>>diptester.properties
echo EPROFILE = %EPROFILE%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # IMPFILE defines the location of the IMPORT profile mapping file for this connector>>diptester.properties
echo #>>diptester.properties
echo # a sample working activechg.map mapping file is located in the >>diptester.properties
echo #>>diptester.properties
echo #     $ORACLE_HOME/ldap/odi/diptester/adsync directory>>diptester.properties
echo #>>diptester.properties
echo # a sample working iplanetimp.map mapping file is located in the >>diptester.properties
echo # >>diptester.properties
echo #     $ORACLE_HOME/ldap/odi/diptester/iplsync directory>>diptester.properties
echo #>>diptester.properties
echo # Windows Users edit and uncomment the following line with your ORACLE_HOME home to use the default>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo IMPFILE = %IMPFILE%>>diptester.properties
echo.>>diptester.properties
echo #>>diptester.properties
echo # Unix Users edit and uncomment the following line with your ORACLE_HOME to use the default>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo #IMPFILE = /u01/app/oracle/product/asdb/ldap/odi/diptester/adsync/activechg.map>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # EXPFILE defines the location of the EXPORT profile mapping file for this connector>>diptester.properties
echo #>>diptester.properties
echo # a sample working activeexp.map mapping file is located in the >>diptester.properties
echo #>>diptester.properties
echo #     $ORACLE_HOME/ldap/odi/diptester/adsync directory>>diptester.properties
echo #>>diptester.properties
echo # a sample working iplanetimp.map mapping file is located in the >>diptester.properties
echo # >>diptester.properties
echo #     $ORACLE_HOME/ldap/odi/diptester/iplsync directory>>diptester.properties
echo #>>diptester.properties
echo # Windows Users edit and uncomment the following line with your ORACLE_HOME to use the default>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo EXPFILE = %EXPFILE%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo #>>diptester.properties
echo # Unix Users edit and uncomment the following line with your ORACLE_HOME to use the default>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo #EXPFILE = /u01/app/oracle/product/asdb/ldap/odi/diptester/adsync/activeexp.map>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # >>diptester.properties
echo # BSCFILE defines the location of the file containing a bootstrap configuration profile.>>diptester.properties
echo #>>diptester.properties
echo # a sample working ad2oid.properties bootstrap configuration file is located in the >>diptester.properties
echo #>>diptester.properties
echo #     $ORACLE_HOME/ldap/odi/diptester/adsync directory>>diptester.properties
echo #>>diptester.properties
echo # a sample working ipl2oid.properties bootstrap configuration file is located in the >>diptester.properties
echo # >>diptester.properties
echo #     $ORACLE_HOME/ldap/odi/diptester/iplsync directory>>diptester.properties
echo.>>diptester.properties
echo # Windows Users edit and uncomment the following line with your ORACLE_HOME to use the default>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo #BSCFILE = D:\\oracle\\asdb\\ldap\\odi\\diptester\\iplsync\\ipl2oid.properties>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo #>>diptester.properties
echo # Unix Users edit and uncomment the following line with your oracle home to use the default>>diptester.properties
echo #>>diptester.properties
echo.>>diptester.properties
echo #BSCFILE = /u01/app/oracle/product/asdb/ldap/odi/diptester/iplsync/ipl2oid2.properties>>diptester.properties
echo.>>diptester.properties
echo BSCFILE = %BSCFILE%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # CONFIGSET and INSTANCE define the odisrv instance and configset being used for DIP>>diptester.properties
echo # synchronization operations.  >>diptester.properties
echo #>>diptester.properties
echo # Note:  If you have installed either Portal or Collabsuite it is very likely that an >>diptester.properties
echo # odisrv PROVISIONING server is being used.  DIP provisioning ALWAYS uses CONFIGSET 0,>>diptester.properties
echo # and are usually started prior to a synchronization server and run as INSTANCE 1.>>diptester.properties
echo #>>diptester.properties
echo #>>diptester.properties
echo # DIP synchronization uses CONFIGSET 1.>>diptester.properties
echo #>>diptester.properties
echo.>>diptester.properties
REM the file x contains CONFIGSET = 1 DOS cannot redirect =1>> commnad prompt sees as stdin/stdout

if "%PROV%" =="0" type y >>diptester.properties
if "%PROV%" =="1" type yy >>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # INSTANCE defines the odisrv instance that will run this connector.>>diptester.properties
echo.>>diptester.properties
REM the file x contains INSTANCE = 1 DOS cannot redirect =1>> commnad prompt sees as stdin/stdout
if "%PROV%" =="0" type z >>diptester.properties
if "%PROV%" =="1" type zz >>diptester.properties
echo.>>diptester.properties
echo # GRPID defines which Profile Group this profile is associated with.  (10.4.2 version ONLY)>>diptester.properties
echo.>>diptester.properties
echo # The default profile group is named defaultgroup)>>diptester.properties
echo.>>diptester.properties
Set /P GRPID=Enter the Profile Group Name that this Profile is to be associated with (GRPID): %
echo.
echo GRPID = %GRPID% >>diptester.properties
echo.>>diptester.properties
echo # DBSID and DBUSER are used for the Oracle Database Connector or eBusiness Provisioning and can be left blank.>>diptester.properties
echo # If configuring for the Oracle Database Connector or eBusiness, you MUST edit your TNSNAMES.ORA to allow >>.diptester.properties
echo # SQLPLUS Connection from this host to the host where the database is running.>>diptester.properties
echo.>>diptester.properties
echo #DBSID = mydb>>diptester.properties
echo.>>diptester.properties
echo DBSID = %DBSID%>>diptester.properties
echo.>>diptester.properties
echo #DBUSER = ods>>diptester.properties
echo DBUSER = %DBUSER%>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo #DBPASS = ods>>diptester.properties
echo DBPASS = %DBPASS%>>diptester.properties
echo.>>diptester.properties
echo # EDITOR defines what editor you wish to use for diptester to edit mapping and config files>>diptester.properties>>diptester.properties
echo #>>diptester.properties
echo # For example:>>diptester.properties
echo #>>diptester.properties
echo # WINDOWS Users>>diptester.properties
echo #>>diptester.properties
echo #EDITOR = notepad.exe>>diptester.properties
echo #EDITOR = write.exe>>diptester.properties
echo.>>diptester.properties
echo EDITOR = notepad.exe>>diptester.properties
echo #>>diptester.properties
echo # UNIX users>>diptester.properties
echo #>>diptester.properties
echo # Solaris Editors>>diptester.properties
echo #>>diptester.properties
echo #EDITOR = /usr/openwin/bin/xedit>>diptester.properties
echo #EDITOR = /usr/openwin/bin/xterm -bg white -exec /usr/bin/vi>>diptester.properties
echo.>>diptester.properties
echo # HPUX Editors>>diptester.properties
echo #EDITOR = /usr/dt/bin/dtpad>>diptester.properties
echo #EDITOR = /usr/bin/X11/xterm -bg white -exec /usr/bin/vi>>diptester.properties>>diptester.properties
echo.>>diptester.properties
echo # Linux Editors>>diptester.properties
echo #EDITOR = /usr/bin/xedit>>diptester.properties
echo #EDITOR = /usr/local/bin/vim >>diptester.properties
echo #EDITOR = /usr/X11R6/bin/xterm -bg white -exec /usr/bin/vi>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # LOGVIEWER defines what diptester will use when viewing log files..>>diptester.properties
echo #>>diptester.properties
echo # Valid options are:>>diptester.properties
echo.>>diptester.properties
echo # .>>diptester.properties
echo # .>>diptester.properties
echo # LOGVIEWER = type>>diptester.properties
echo # LOGVIEWER = cat>>diptester.properties
echo # LOGVIEWER = tail -100>>diptester.properties
echo # .>>diptester.properties
echo.>>Note: unix utilities cat.exe, grep.exe and tail.exe from the Microsoft Support For Unix distribution have been
echo.>>copied to the ORACLE_HOME\bin directory
echo.>>diptester.properties
echo LOGVIEWER = tail -100>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # TEMPDIR for diptester working files..>>diptester.properties
echo # >>diptester.properties
echo # Windows 2000 or Windows XP>>diptester.properties
echo #TEMPDIR = C:\\WINNT\\TEMP>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo # >>diptester.properties
echo # Windows 2003 >>diptester.properties
echo # TEMPDIR = C:\\WINDOWS\\TEMP>>diptester.properties
echo # >>diptester.properties
echo # UNIX>>diptester.properties
echo #TEMPDIR = /tmp>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo TEMPDIR = C:\\WINNT\\TEMP>>diptester.properties


echo #Setting the DEBUG value to 0 or 1 will control logging all diptester>>diptester.properties
echo #commands to the file $ORACLE_HOME\ldap\odi\log\diptester.log>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
type w >>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo.>>diptester.properties
echo The default diptester.properties has been created in %ORACLE_HOME%\ldap\odi\diptester
echo   This file contains your configuration info used by diptester.  
echo   It may be edited prior to launching diptester.  Optionally, you can use 
echo   diptester to modify any of the parameters and reload the config.
echo.
echo Creating diptester file folders..
mkdir %ORACLE_HOME%\ldap\odi\diptester
mkdir %ORACLE_HOME%\ldap\odi\diptester\adsync
mkdir %ORACLE_HOME%\ldap\odi\diptester\iplsync
mkdir %ORACLE_HOME%\ldap\odi\diptester\dbsync
mkdir %ORACLE_HOME%\ldap\odi\diptester\edirsync
mkdir %ORACLE_HOME%\ldap\odi\diptester\opldsync
echo.
echo Copying diptester files..
copy build_properties.bat %ORACLE_HOME%\ldap\odi\diptester
copy diptester.properties %ORACLE_HOME%\ldap\odi\diptester

copy cat.exe %ORACLE_HOME%\bin
copy grep.exe %ORACLE_HOME%\bin
copy tail.exe %ORACLE_HOME%\bin
rem 
copy diptester.bat %ORACLE_HOME%\bin

copy diptester.jar %ORACLE_HOME%\ldap\odi\jlib

copy Active*  %ORACLE_HOME%\ldap\odi\diptester\adsync
copy active*  %ORACLE_HOME%\ldap\odi\diptester\adsync
copy ad2oid.properties   %ORACLE_HOME%\ldap\odi\diptester\adsync

copy Iplanet*  %ORACLE_HOME%\ldap\odi\diptester\iplync
copy iplanet*  %ORACLE_HOME%\ldap\odi\diptester\iplsync
copy ipl2oid.properties   %ORACLE_HOME%\ldap\odi\diptester\iplsync

copy eDirectory*  %ORACLE_HOME%\ldap\odi\diptester\edirsync
copy edirectory*  %ORACLE_HOME%\ldap\odi\diptester\edirsync
copy edir2oid.properties   %ORACLE_HOME%\ldap\odi\diptester\edirsync

copy OpenLdap*  %ORACLE_HOME%\ldap\odi\diptester\opldsync
copy edirectory*  %ORACLE_HOME%\ldap\odi\diptester\opldsync
copy opld2oid.properties   %ORACLE_HOME%\ldap\odi\diptester\opldsync

copy HREmpSync.*  %ORACLE_HOME%\ldap\odi\diptester\dbsync
copy DB*  %ORACLE_HOME%\ldap\odi\diptester\dbsync
copy *DB*  %ORACLE_HOME%\ldap\odi\diptester\dbsync
copy create*.bat  %ORACLE_HOME%\ldap\odi\diptester\dbsync
copy delete_trigger.sql  %ORACLE_HOME%\ldap\odi\diptester\dbsync

copy OracleHR*  %ORACLE_HOME%\ldap\odi\diptester\hrsync
copy oraclehr*  %ORACLE_HOME%\ldap\odi\diptester\hrsync

echo Done.
echo.
echo.
echo To run diptester, create a DOS cmd prompt from the drive letter of your ORACLE_HOME
echo and enter the command: diptester
echo.
echo With your Oracle environment properly set, it will run automatically since
echo the diptester executable was copied to the '$ORACLE_HOME/bin' directory
echo by this install script.
echo.
echo NOTE:  IT IS HIGHLY RECOMMENDED THAT YOU OBTAIN AND INSTALL A DOS VERSION OF UNIX TAIL.
echo.
echo Please review the diptester_readme.html for download locations as well as additional information.
echo.
echo.

:bottom
echo.
echo Exiting Program

