I am in the process of developing an eClient application that will use
the Load'n'Run technology for distribution. As part of the application,
the are several Word & Excel templates that are used for generating
reports. When the application is downloaded to the client all the files
are initially placed in the II_ECLIENT_APPDIR directory. In order to
run the templates, they need to be copied to the user's template folder
(APPDATA\microsoft\templates) - to allow macros to be executed.
I can do this the first time the application is run based on the files
being missing. However, if the templates are modified, and so
re-downloaded to the II_ECLIENT_APPDIR folder, this check will not cause
them to be copied to the template folder. I was thinking of comparing
the files creation dates and copying if the ECLIENT folder version of
the file is newer. However, I am not sure how to access the various
dates of a file from OpenROAD.
Does anyone know how to do this, or have an alternative solution?
Ideally, I do not want to simply copy the templates every time the
application is run as this seems rather wasteful.
Many thanks,
Martin Bloomfield.
_________________________________________________
Application Developer & Database Administrator
IT Branch
Chemicals Regulation Directorate
Health and Safety Executive
YORK
Email: martin.b...@hse.gsi.gov.uk
Website: www.pesticides.gov.uk <http://www.pesticides.gov.uk/>
www.hse.gov.uk <http://www.hse.gov.uk/>
P Save a tree... please don't print this e-mail unless you really need
to
*****************************************************************************************************************
Please note : Incoming and outgoing email messages are routinely monitored for compliance with our policy on the use of electronic communications and may be automatically logged, monitored and / or recorded for lawful purposes by the GSI service provider.
Interested in Occupational Health and Safety information?
Please visit the HSE website at the following address to keep yourself up to date
*****************************************************************************************************************
The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by Cable&Wireless Worldwide in partnership with MessageLabs. (CCTM Certificate Number 2009/09/0052.) On leaving the GSi this email was certified virus free.
Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes.
One way of doing this in a Windows environment is to use KixStart scripting.
The GetFileTime would be part of the answer.
See http://www.kixtart.org
Regards
Dave
> --
> You received this message because you are subscribed to the Google Groups
> "OpenROAD Users Mailing List" group.
> To post to this group, send email to openroa...@googlegroups.com.
> To unsubscribe from this group, send email to
> openroad-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/openroad-users?hl=en.
>
>
Chris
On Monday 2012-02-06 14:28 (-0800), da...@skybeam.plus.com wrote:
> Hi Martin,
>
> One way of doing this in a Windows environment is to use KixStart scripting.
> The GetFileTime would be part of the answer.
> See http://www.kixtart.org
>
> Regards
> Dave
>
>
>
>> All,
>>
>> I am in the process of developing an eClient application that will use
>> the Load'n'Run technology for distribution. As part of the application,
>> the are several Word& Excel templates that are used for generating
>> reports. When the application is downloaded to the client all the files
>> are initially placed in the II_ECLIENT_APPDIR directory. In order to
>> run the templates, they need to be copied to the user's template folder
>> (APPDATA\microsoft\templates) - to allow macros to be executed.
>>
>> I can do this the first time the application is run based on the files
>> being missing. However, if the templates are modified, and so
>> re-downloaded to the II_ECLIENT_APPDIR folder, this check will not cause
>> them to be copied to the template folder. I was thinking of comparing
>> the files creation dates and copying if the ECLIENT folder version of
>> the file is newer. However, I am not sure how to access the various
>> dates of a file from OpenROAD.
>>
>> Does anyone know how to do this, or have an alternative solution?
>> Ideally, I do not want to simply copy the templates every time the
>> application is run as this seems rather wasteful.
>>
>> Many thanks,
>> Martin Bloomfield.
>> _________________________________________________
>> Application Developer& Database Administrator
Perhaps use WinAPI? Here is a link:
http://msdn.microsoft.com/en-us/library/aa364233(v=vs.85).aspx
I think one of these will do the trick
GetFileAttributesEx
WIN32_FILE_ATTRIBUTE_DATA
GetFileInformationByHandle
FILE_BASIC_INFO
I've come across problems relying on the timestamp in the past when
distributing components across a different time zone. And when daylight
savings kicks in, old files detect an hour difference.
You might consider managing a central list of templates with checksums. If a
change in checksum is detected, the component needs to be updated.
Somewhere around here I've got an OpenROAD / C integration which calculates
md5 hash on a piece of text. I'm sure there are better directory
synchronisation controls.
Paul