Disable run through .pen File

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
leulae
Posts: 46
Joined: December 16th, 2016, 5:51 am

Disable run through .pen File

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Disable run through .pen File

Post 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;
leulae
Posts: 46
Joined: December 16th, 2016, 5:51 am

Re: Disable run through .pen File

Post 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;
Post Reply