Disable run through .pen File

Other discussions about CSPro
leulae
Posts: 39
Joined: December 16th, 2016, 5:51 am

Disable run through .pen File

Postby leulae » March 31st, 2018, 1:06 pm

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

Gregory Martin
Posts: 1099
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Disable run through .pen File

Postby Gregory Martin » April 2nd, 2018, 9:39 am

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;

leulae
Posts: 39
Joined: December 16th, 2016, 5:51 am

Re: Disable run through .pen File

Postby leulae » April 7th, 2018, 9:38 pm

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;


Return to “Other”