Cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Phenom
Phenom

How can Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Client? With each update, OTW overwrites them with standard ones. I need my changes to otwportal.bat and nxmanager_portal.bat not to be overwritten every time I update through OTW.

9 REPLIES

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Not possible. OTW will reapply the "targets" in the ICD files whenever the manifest on the client doesn't match the manifest on the server. That's what OTW is designed to do. IF you want more control of the update and file modifications in RAC then you'll have to change your deployment method to TEM and all that implies.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Phenom
Phenom

Hello Randy, thanks for your reply!

And what about the template folders in rac, it seems there are templates for these files, do you think, will it work if you make changes to them on the OTW server?

 

templates.jpg

I need some simple solution, how can I change this behavior.

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
On the server, perhaps not, unless you uninstall and redeploy the RAC again. What you need to resolve this is a custom ICD. However, the effort you put into developing the custom ICD will be short lived as OTW is obsolete.

Which files do you currently modify besides otwportal.bat and start_nxmanager.bat? Do you have custom status icons for instance?

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Phenom
Phenom

I have experience writing ICD, this is not a problem. But the question is, what will it give me? I will be able to update through it the files otwportal.bat and start_nxmanager.bat, and I will need to upgrade the ICD version every time I update OTW so that it updates both otwportal.bat and start_nxmanager.bat? And at what point it will regenerate the files otwportal.bat and start_nxmanager.bat, it seems to me that at the end of the update.

For everything else, I have an ICD that updates the plugins directory, the icons are inside the plugins.

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
In that case, in your custom ICD for otwportal.bat, in the target "file_download_win", add the following (or whatever your customization is):
<target name="file_download_win">
# MultiClient Support: Force setting of FMS_HOME
<replace file="otwportal.bat" token="if not defined FMS_HOME " value=""/>
# MultiClient Support: Stop any previously running FCC
<replace file="otwportal.bat" token=":start_portal" value="%FMS_HOME%\bin\fccstat -stop&#13;&#10;&#13;&#10;:start_portal"/>
</target>

NX is more complicated and I usually use a separate ICD since not every RAC needs to have NX installed. And the ICD fails without NX being installed first. I assume you are modifying start_nxmanager.bat for the mapped drive location of NX Custom or do you have some other customization?

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Phenom
Phenom

Oh that's quite interesting! As far as I understand it, it will make a change directly to the otwportal.bat file, so I can just add it to my custom ICD.

About start_nxmanager.bat yes, you are right, I just specify the path to the NX settings:
set UG_ENV_FILE = Path
If it's not difficult for you, then suggest how best to set this value.

If it is in a separate ICD for NX, should I upgrade the ICD version for NX with any update of another ICD?

And one more question, do you think I need to add a row with editing in the registry in otwportal.bat, to specify the location to the correct start_nxmanager.bat, if I intend to use the same custom NX settings for different clients? That is, my start_nxmanager.bat will be the same.

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

I usually create a separate ICD for NX customizations because not every user will have NX installed. So I have a NX flavored rich client and a non-NX flavored rich client. The NX ICD refers to start_nxmanager.bat.nxcustom in the zip file. In that file I have a placeholder ~LsgNxCustomDir~ and replace this with the value set in context params.

 

How OTW decides which ICD is applied first is a complete mystery and appears to be random. For this reason, I had to include logic for if the start_nxmanager.bat exists in portal_root and if not then replace the template.

 

The path to start_nxmanager.bat stored in the registry is updated using a "reg add" call in otwportal.bat.

 

I've attached a solution from an old customer for your review. It was built specifically for adding NXcustom.

 


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Phenom
Phenom

Thanks for the excellent answer and examples.
I have only one question: is it necessary to upgrade the versions in these ICDs (to close the FCC and the path to the NX settings) with each update of the plug-ins using a separate ICD file, so that they perform their work on patching the bat files?

Re: Prevent regenerate otwportal.bat and nxmanager_portal.bat when OTW update 4-Tier Rich Client

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Yes, OTW updates are completely dependent on the version number. So its important that your new version number sorts after the old one or you will not trigger an update. For instance, if the old version is "3" and your new version is "2018" then an update will not be triggered (2 sorts before 3 not after).

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4