Register and Un register DLLs

Version 1
    Share:|

    #bin/nsh

     

    #Parameters

    #OS_Platform whether server type is 32bit or 64bit

     

    SrvType=$1

    OS_Platform=$2

     

    #NSH Script Variables

    TargetSrv=`hostname`

     

    # Execute below for 32bit Servers Only

    if [ $OS_Platform = 'x86' ]

    then

          if [ $SrvType != 'CITRIX' ]

          then

                cd "/f/data/openlink/endur/bin"

          else

                cd "/c/data/openlink/endur/bin"

          fi   

     

          UnRegisterDlls=(cdo32.dll craxdrt9.dll crdb_cdo.dll crdb_fielddef.dll crdb_odbc.dll crdb_oracle.dll crdb_p2ssyb10.dll crpe32.dll crqe.dll implode.dll Keycode.dll querybuilder.dll Sscsdk80.dll U2dapp.dll U2ddisk.dll U2dmapi.dll U2dnotes.dll ufmanager.dll u2frec.dll u2fcr.dll u2fodbc.dll u2frdef.dll u2fcompress.dll u2fsepv.dll u2ftext.dll u2fxml.dll usp10.dll Crviewer9.dll craxddrt9.dll MSHFLXGD.OCX Msflxgrd.ocx MSWINSCK.OCX OlfapiAttach.ocx tabctl32.ocx vsflex8l.ocx)

          foreach dll in $UnRegisterDlls

          do

          nexec $TargetSrv regsvr32.exe /u /s $dll

          done

     

          RegisterDlls=(cdo32.dll crqe.dll Keycode.dll Crviewer9.dll Msflxgrd.ocx MSHFLXGD.OCX MSWINSCK.OCX OlfapiAttach.ocx tabctl32.ocx vsflex8l.ocx)

          foreach dll in $RegisterDlls

          do

          nexec $TargetSrv regsvr32.exe /s $dll

          done

    fi