How to determine the last time an executable has been run?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
zeke
Newbie
Posts: 11
Joined: Thu Dec 08, 2005 7:23 pm

How to determine the last time an executable has been run?

Post by zeke » Tue Aug 28, 2007 2:13 am

We are trying to determine who in our organization still needs to use Adobe Acrobat Professional 7.0.

We have a list of some 50 users who have Adobe Acrobat Professional 7.0 on their machine.

The path to the executable is:

"C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe"

What we want to know is how we can create a macro scheduler script or vbscript in combination with macro scheduler to determine the last time a user used the acrobat.exe executable shown above.

Thanks again for any hints or insights into this one!

John Falloon

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Aug 28, 2007 3:54 am

In Windows XP Pro, on Add/Remove programs screen, I think there is a column that shows the last date used. Cannot confirm that right now, but if that is the case, then I suspect there is a registry setting somewhere that hold that info.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Tue Aug 28, 2007 4:39 am

I am not clear on how many PC’s/Users you need to monitor, but if it’s not too many I might do something like the following if you have MS Pro.

-Create a simple .exe with Macro Scheduler*
-Find and use the ‘typical’ Adobe Icon for your new MS.exe
(Icon is here- C:\Program Files\Adobe\Acrobat x.0\Reader\AcroRd32.exe)
-Replace all the current desktop Icons with your new one

*The script could gather system/user info, denote and timestamp access and then place or send the data to your desired location/recipient and execute Adobe.

The drawback would be a user directly accessing the program by Windows exploring to it. But we know that most users would use the desktop Icon if its there …

Just a thought… Good Luck.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Aug 28, 2007 12:27 pm

I'd use the DOS dir command with the /T:a option which gives the last access date.

the following is not tested and may have typos.

Code: Select all

Let>filename=C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe
Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
Run>cmd /c dir "%filename%" /T:a > TEMP_DIR%~AdobeLastAccessTime.txt
ReadFile>TEMP_DIR%~AdobeLastAccessTime.txt,LastAccessTime
DeleteFile>TEMP_DIR%~AdobeLastAccessTime.txt
MDL>%LastAccessTime%


Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts