#206652 - 2013-02-08 10:31 AM
Re: New function to get environment variables modified with SETL
[Re: BradV]
|
ChristopheM
Hey THIS is FUN
Registered: 2002-05-13
Posts: 309
Loc: STRASBOURG, France
|
in my company, we have about 4500 workstations and 400 applications (not all installed on all workstations) to manage. Very often, we can have up to 20 applications on a workstation with multiple middleware (oracle 9, oracle 11, java 1.5, Java 1.6, Java 1.7, etc...). The cohabitation of these softwares is not guaranteed by the editors so we try to do configuration dynamically at execution (not at installation).
1) When we launch an application, we have a .cmd script that launch a .kix script. if we had to launch an other .cmd script to launch the .exe, it becomes complex.
2) We have to change many times because usually, applications need one or more middlewares. Each middleware is configured with a specific function. With all these middlewares, we can't change env var at the installation because this is the last installed that wins !!!
3) to answer to lonkero, i agree that env var can't be used like kix vars. But if an application needs Oracle 9 client (for example), the path var must contain reference to oracle 9 client directory (not Oracle 11 client). If a user needs simultaneously an application Oracle 9 and an application Oracle 11, I have to modify the local context of every application.
Unfortunatly, I don't decide how applications are coded and especially middlewares. For example, Oracle modules are very "dirty". Cohabitation is not supported but in the real world, we must have cohabitation.
4) to answer to Glenn, the problem is not to control that a directory is already in the path. I already do that with array (like your code). The problem is to add several directories but not at the same time in the script. Several functions have to add ONE directory in the path. Now, there is no solution with integrated kix functions.
I can rewrite my own functions to replace SETL, SHELL or RUN and add a GETL function. This is not very complex but then, I shall have to modify approximately one thousand scripts to use these new functions. It is a very heavy operation with many risks. I shall also have to explain new functions to several scripters and control that they use theses functions correctly.
If I could have a integrated function like ExpandEnvironmentVars with an optional parameter, I would have to modify only some functions that are currently grouped in a library. The operation would be less heavy and the risks much more limited.
As Lonkero said, we would have no these problems if KiXtart implemented correctly the management of the current environment with SETL.
Thanks to all
_________________________
Christophe
|
Top
|
|
|
|
#206653 - 2013-02-08 12:02 PM
Re: New function to get environment variables modified with SETL
[Re: ChristopheM]
|
BradV
Seasoned Scripter
Registered: 2006-08-16
Posts: 686
Loc: Maryland, USA
|
Hi Christophe,
Well, first it sounds like your company needs to simplify applications a little.
So, if I understand it, you have a Windows command script which calls a kixtart script which then shells out and starts the application? If so, what are you doing in the kixtart script? Can it all just be accomplished in the command script?
Regards,
Brad
|
Top
|
|
|
|
#206685 - 2013-02-12 06:52 PM
Re: New function to get environment variables modified with SETL
[Re: BradV]
|
ChristopheM
Hey THIS is FUN
Registered: 2002-05-13
Posts: 309
Loc: STRASBOURG, France
|
sorry for delay.
1) BradV, changing the way to start application is not the matter now, maybe when we'll migrate to Windows 8 or Windows 8 (or later) but not now for XP.
Kix scripts are used to read-write ini configuration file, read or write values in registry, all things that aren't easy to do with .cmd scripts.
2) Allen, we have to build the path, not to fix it. As I said in my previous post, we configure environment (not only env vars) for application before starting application. this allows us to use test, production, formation versions of a same application on the same workstation, even if they are not really compatible (for example a parameter in the registry that gives the name of the database to connect to).
3) Lonkero, if i write my own functions, i have potentially one thousand of scripts to modify. May be i could let unchanged scripts that do not really need to be changed, but by experience, i know that all the scripts are going to become heterogeneous (i am not the only developperand all are not as perfectionist than I). I agree with you, KiXtart should be compliant with env var management.
Regards, Christophe
_________________________
Christophe
|
Top
|
|
|
|
Moderator: Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 259 anonymous users online.
|
|
|