These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Does any one know a Javascript that would shut down the doc if computer's date/clock is changed?

pdfer
Registered: Dec 23 2010
Posts: 28

The main reason for using a Javascript, for me, is my doc is all Javascript. And, many people want to access and use the info in the doc. And, I want them to use my doc. So, they have to leave Javascript Enabled. That being said I now can implement the Expire code using Javascript.
 
I got the Expire code to work. Just the way it should and the way I want. I have put it in the PageOpen. It shuts down the doc like clock work. But, what I've found out is, if the viewer sets his or her computer's Clock/Date setting to prior the Expire date they have successfully hacked in the doc. Although they couldn't leave their computer's setting like that, and would have to make this adjustment every time. But still, I still like using this Expire code. But, does anyone know how to Expire the doc (even if the viewer does reset the computer's settings).
 
I'm looking for a Javascript that would do. Kinda like - if the dates and times are not the same as in the Expire Javascript code - then do this - Quit/Close. The dates and times have to match or the doc will Quit. If I can get that then I'll feel pretty confident with the doc's protection. Can any one help?

Jackson C.

My Product Information:
Acrobat Pro 9.0, Macintosh
DaveyB
Registered: Dec 10 2010
Posts: 70
There are two ways of approaching this that I can see:

The first is to access an internet clock to check the current date/time, which may or may not be available depending on corporate firewalls, internet connectivity, etc.

The second is a bit more sneaky and underhanded. I just noticed your signature, so I'll have to wing it a bit on this one since you are on a Mac and I use a PC. On a windows machine, there is a file stored in the temp folder called AdobeARM.log which records update attempts from Adobe Reader to check its version. Since it is sitting in a temp folder, you should have no security issues accessing it and reading the contents - check to see if the date suddenly went backwards or is greater than the current date! Unless they cleared their temp folder, then even changing the date and rebooting will not alter the content of the log file - open it up and you'll see what I mean!

There should be a similar file on a Mac, although I don't really know for sure. If not, then use one of the system log files (you may have security problems accessing a system folder), maybe one that records the events on a system boot, and compare the date of that to the current date. If the security prevents you from accessing those logs, there are other files that are not protected (such as the AdobeARM.log mentioned above) that are updated on boot only, just a matter of selecting the correct file for your purpose from the tens of thousands that infest any modern computer system!

Hope that helps!

DaveyB

LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB