Source language: Translate to:

Run Encrypted PUB

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Run Encrypted PUB

Postby Jim Brammer » Thu Feb 07, 2002 3:27 pm

I found in the Suggestions forum a post asking about how to run an encypted pub. It's probably an old request and the poster probably has found a solution by now, but thought I'd dust it off for the sake of discussion...

    Create encrypted PUB that can be run by a compiled NBK EXE

    Currently, each compiled file has the runtime player embedded inside the EXE file. It would be good to allow PUB to be pseudo-compiled (encrypted and/or with ptush word protection) and yet be executable from a NeoBook-compiled EXE program. This means that I can create a modular project with the front-end compiled as EXE, say a tourist promotion program. Then there are links/hotspots to access different "Places of Interests". This link to external pseduo-compiled PUB (say,, file extension can be anything we like, and need not be restricted to say, *.PUB). E.g:

    DOWNTOWN.DAT <-- note, the extension is DAT.. it's not a DAT MPG)
    DOWNTOWN.BMP <--- it is not a Windows BitMap file..but filename disguised as BMP format.

    The overview is like this:


I think this can be done now using the CALL command and by using a PlugIn that encrypts and decrypts files. An external Function file would be used in place of a 'PUB' as described above. Also, this Function file should not be compiled into the EXE. In other words, make sure the Function file does not exist in the Publication folder or NeoBook's Function folder when you compile your final EXE otherwise it will be embedded into your program.

Use a PlugIn to encrypt your external Function file (which can be named with any extension you choose). Place your now encrypted Function file in some location accessible to your program. It can be anywhere, really. In your program use the same PlugIn and cypher key to decrypt the Function file at runtime then use the CALL command to activate the external script commands. Then, erase the file when you're done...

FileErase "[TempDir]DOWNTOWN.ABC"
Jim Brammer

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 1 guest