ProENV

Dan101

New Member
Hi,

I am looking for a way to enter commands automatically into a ProENV session.

What I have to complete is the following, I have to enter each of our 4 databases and run the following command;

proshut d:prodisk\Proclaim\v3db\proclaimdb\proclaim

I am looking for a way of creating an icon which when I double click does the following....

Starts

C:\Program Files\OpenEdge\bin\ProEnv.bat

Then

Runs the following command

proshut d:prodisk\Proclaim\v3db\proclaimdb\proclaim

Then I can setup 4 x icons with 4 different database references

Lazy I know but everything helps.

Cheers
Dan
 

RealHeavyDude

Well-Known Member
If you look into the proenv script you will notice that all it does is to set the environment variables (DLC and PATH respectively) accordingly. You need to create 4 different scripts and reference them in your icons.

Something like:
@echo off
set DLC=C:\Program Files\Progress\OpenEdge
set PATH=%DLC%\bin;%DLC%;%PATH%

D:
cd \Data\Rad\shared\aos_entw\databases

call proshut "icfdb/ld_icfdb" -by
call proshut "onedb/ld_onedb" -by

exit

Heavy Regards, RealHeavyDude.
 

Dan101

New Member
Hi,

Here is the current script the run the PROENV;

@echo off
set DLC=C:\PROGRA~1\OpenEdge
if x%1 == xpsc goto setit

if not exist %DLC%\bin\proenv.bat goto err_end
if not "%OS%"=="Windows_NT" set ENVSIZE=/E:5120
if exist %COMSPEC% goto csok
echo.
echo COMSPEC is not defined correctly, the current definition is:
echo COMSPEC=%COMSPEC%
echo.
pause
exit

:csok
%COMSPEC% %ENVSIZE% /K %DLC%\bin\proenv.bat psc
if not x%1 == xpsc goto tell

:setit
set PATH=%DLC%\BIN;%PATH%
set LIB=%DLC%\LIB;%LIB%
if x%1 == xpsc prompt proenv$g
cls
goto tell

:err_end
echo.
echo DLC variable is not correct - Please check setting in (%0)
echo.

:tell
cls
echo.
echo DLC: %DLC%
echo.
echo Inserting %DLC%\bin to beginning of path and
echo the current directory is
cd
echo.
type %DLC%\version
 

RealHeavyDude

Well-Known Member
Never ever edit a script that comes with the installation. Whenever you apply a patch or upgrade chances are you will lose it.

Just build your own scripts - you can take the example I've posted as a starting point.

Heavy Regards, RealHeavyDude.
 

paulb9966

New Member
Hello,

I also had the same problem, but while reading this thread i noticed the reference to %DLC%\bin\proenv.bat, i added the proshut command to that batch file and it worked a treat!
so if you havent already solved it, you need to:

create a batch file called kickem.bat in C:\Program Files\OpenEdge\bin (or wherever your installation is)

@echo off
set DLC=C:\PROGRA~1\OpenEdge
set WRKDIR=C:\OpenEdge\WRK
set OEM=C:\Program files\oemgmt
set OEMWRKDIR=C:\OpenEdge\wrk_oemgmt
if x%1 == xpsc goto setit


if not exist %DLC%\bin\kickem.bat goto err_end
if not "%OS%"=="Windows_NT" set ENVSIZE=/E:5120
if exist %COMSPEC% goto csok
echo.
echo COMSPEC is not defined correctly, the current definition is:
echo COMSPEC=%COMSPEC%
echo.
pause
exit


:csok
%COMSPEC% %ENVSIZE% /K %DLC%\bin\kickem.bat psc
if not x%1 == xpsc goto tell


:setit
set PATH=%DLC%\BIN;%DLC%\PERL\BIN;%PATH%
set LIB=%DLC%\LIB;%LIB%
if x%1 == xpsc prompt proenv$g
cls
goto tell


:err_end
echo.
echo DLC variable is not correct - Please check setting in (%0)
echo.


:tell
cls
echo.
echo DLC: %DLC%
echo.
echo Inserting %DLC%\bin to beginning of path and
cd d:\prodisk\proclaim\v3db\proclaimdb
d:
echo the current directory is
cd
echo.
type %DLC%\version
proshut proclaim

i notice you also wanted to do the other 3 databases too, ive found i only need to kick em out of the proclaim db to resolve our proshut errors. I suppose you could make kickem2, 3 and 4 if you wanted to do it properly.....

hope this helps
 
Top