Page 1 of 1

Disable run through .pen File

Posted: March 31st, 2018, 1:06 pm
by leulae
Dear all

CSpro data entry applications deploy to users with pen and pff file.

If user clicks on .pen file program starts. I need a method to run the application only though .pff, Is this achievable?

Thank all

Leulae

Re: Disable run through .pen File

Posted: April 2nd, 2018, 9:39 am
by Gregory Martin
On Windows, if you run the .pen file, then CSEntry will allow the user to enter file information, which will create a new .pff file. If you do not want to allow the user to create their own .pff file, you could do something like this:

1) Add a special parameter to your valid .pff file that only you know, like this:

[Parameters]
ValidPffOpenCheck=1

2) In your program, in the application preproc, you would check if this is set, and if not, you would quit the program, like this:
PROC APPLICATION_FF

preproc

    if sysparm("ValidPffOpenCheck") <> "1" then
        errmsg("You can only run this program from the valid PFF");
        stop(1);
    endif;

Re: Disable run through .pen File

Posted: April 7th, 2018, 9:38 pm
by leulae
Great, Thank you

Leulae
Gregory Martin wrote:On Windows, if you run the .pen file, then CSEntry will allow the user to enter file information, which will create a new .pff file. If you do not want to allow the user to create their own .pff file, you could do something like this:

1) Add a special parameter to your valid .pff file that only you know, like this:

[Parameters]
ValidPffOpenCheck=1

2) In your program, in the application preproc, you would check if this is set, and if not, you would quit the program, like this:
PROC APPLICATION_FF

preproc

    if sysparm("ValidPffOpenCheck") <> "1" then
        errmsg("You can only run this program from the valid PFF");
        stop(1);
    endif;