I have recently had to return to a legacy application generated in Cool:Plex 4.5 and migrate it to CA Plex 7.2. The application has a number of different environments which were organised by a folder for each identical executable and the accompanying .ini file. The .ini file for each environment had a different ODBC DSN specified. However, the executable, and therefore, the .ini file has the same name.
This arrangement has worked fine installed in the Program Files folder and even supported multiple versions running in parallel. The UAC folder virtualisation of the Program Files folder meant that the .ini files were correctly differentiated between the environments and different versions. However, from initial testing I can see that the .ini file is now copied into the Documents folder but is only differentiated by the executable's name. Is this correct?
This is only my first couple of days working with 7.2 so I am sure I must be missing something. How can I deploy multiple environments and/or versions of a Plex generated application on the same pc/server if the .ini files are not organised to uniquely identify the executable's location? As I mentioned before, Windows folder virtualisation of Program Files does this very well by replicating the folder structure within the ApplicationData folder so I initially do not see the logic behind Plex's new behaviour.
Can someone help me out?
welcome back Chris
Extract from CA Plex 6.1 "Release Notes" pdf"CA Plex 6.1 is compatible with Windows Vista such that the tool can be used
"CA Plex 6.1 is compatible with Windows Vista such that the tool can be used
by a standard user without administrator privileges. As part of these updates,
multi-user support has also been added. This means that each user of CA Plex
on a Windows system will get their own set of configuration files (e.g. plex.ini)
when running the CA Plex development environment.
When you run CA Plex r6.1 for the first time, CA Plex creates your own
personal copy of Plex.ini....This means that the copy of Plex.ini under Program Files is not actually
used when CA Plex is run, except as a template from which your personal copy
of the file is first created."
Configuration files for plex 6.1 could help but it was not a change of Plex per say but a change for vista
If you cant get it to work or cant get permission from network staff then you will have to take an hour or two and create dedicated exe for each environment.
Thanks everyone for your replies.
The problem seems to be that CA have used the Documents folder to provide their own version of folder virtualization but they have done this in an unnecessarily restrictive way by making the only unique identifier of an application the name of the executable. Windows Vista and later were compatible with our Cool:Plex 4.5 applications (at least with the way we used them) because all those operating systems provided multi-user non-admin access through folder virtualization. For instance, my ini files would be represented in C:\Users\hallc\AppData\Local\VirtualStore\Program Files (x86)\<CurrentCompany>\<CurrentProduct>\<Version>\LiveEnvironment or C:\Users\hallc\AppData\Local\VirtualStore\Program Files (x86)\<CurrentCompany>\<CurrentProduct>\<Version>\PlanningEnvironment. By using the folder structure of the executable's file path, Windows provided the unique link to a fully accessible ini file for each executable. Why did CA not do this?
From what I can see, the best way for us to work with the new functionality is to implement Lorenz's suggestion of using the shortcuts to pass the function name parameters to differently named executables.
Thanks for your help.
Hi Chris -
To start your different environments you could use shortcuts :
a) for each environment create .exe by copying OB600RC.EXE . let's say AA.exe , BB.exe
b) Create shortcut for AA.exe and BB.exe
c) Pass the name of your starting function as a parameter to the .EXE using this syntax: C:\YourAppFolder\AA.EXE Start.dll Start
in Plex Help.
but watch out for a bug that involves running the same exe name which meant if you are running two instances of the same exe "DLL directory path=c:\models\gen" was not being respected for the first instance. ie if the directory differs the latest instance of the DLL path was being used by the first instance of the exe irrespective of it's setting. I think I got it fixed but dont know these days which versions it was included in.
Hence we gave up and created different exe in the model
PRN 612250 - DLL AND PNL PATHS INI SETTTINGS IN MEMORY
Plex Help document says about user can make an INI setting to store
in-memory using SetOption() API and GetOption is used to read that
in memory value. However though 'PNL directory path' and 'DLL directory
path' INI keys are stored in-memory, PLEX WINC runtime reads from INI file
All INI keys are not supported for in-memory support by default
because of performance reason. Though user sets those keys for
in-memory support using SetOption() API, PLEX WinC runtime
reads 'PNL directory path' and 'DLL directory path' INI keys
from INI rather than from memory.
Plex document ->Get INI System Value section to be updated with a note.
All INI keys are not support for in-memory feature.
Only C:\Program Files (x86)\CA\Plex\7.0\include\OBOPT.H file will
says about in memory supported keys.
CA Plex r6.1 (All versions | up to PTF610.043.039)
CA Plex r7.0 (All versions | up to PTF700.001.008)
CA Plex r7.1 (All versions | up to PTF710.026.000)
Related Solution #40 Release:6.1 APAR #RO70689
Related Solution #9 Release:7.0 APAR #RO77266
lack of mention of Plex 7.2 implies it is solved for current version?
I found that the Problem Number for this problem is #2270, and I found that it is not yet included in the IR1 release of Plex 7.2. We are currently working on the GA release of Plex 7.2 and this fix will be in that release.
CA Plex Support
it took me about 12 months to get it fixed and I never gave up when all told me to leave it as CA took months to understand the issue.
but I think for Chris to simply create new exe with different names could by pass any potential issue.