How to prevent WBEX file from unpacking after installation?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 467
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
edited December 2022 in General Language Questions

When I create a WBEX using any of the below mentioned security options, the installed WBEX unpacks itself in the %appdata%\Ansys\v211\ACT\extensions folder and anyone using the WBEX can see the whole source code, which defeats the purpose of encryption. How can I encrypt the source code and prevent it from unpacking?

enter image description here

Tagged:

Best Answer

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 467
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    Answer ✓

    The trick to this is using the attribute compiled="true" in the script tag of the ACT extension XML.

    Example XML:

    <extension version="2" minorversion="1" name="WizardDemos">
        <guid shortid="WizardDemos">7fdb141e-3383-433a-a5af-32cb19971771</guid>
        <author>ANSYS Inc.</author>
        <description>Simple extension to test wizards in different contexts.</description>
    
        <script src="main.py" compiled="true"/>
        <script src="ds.py" compiled="true"/>
    ...
    

Answers

  • Gerd
    Gerd Member Posts: 1
    First Comment
    **

    Dear Kumar,

    thanks for the trick. I do it in this way. The problem is now, when I build the extension the files with attribute compiled="true" will be skipt and are not aviable later. Have you a solution for this problem?



  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 467
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    edited March 2023

    Hi @Gerd, This is exactly what the attribute compiled="true" does. By default it is false and the python file will be not be compiled, i.e. you can see the code under %appdata%\Ansys\v231\ACT\extensions. If set to `true`, the Python file will not be unpacked.