>>Hi Everyone,
>>
>>A program(EXE) is running under Windows NT Workstation
>>shell (Local Machine).
>>If I want to upgrade it over the network, so that next
>>time the program will replace with the new one while
>>the computer is shutdown and turn on again.
>>What should I do?
>>
>>Thank you.
>>
>>Charles
>
>
>Here's what we do.
>
>START.PRG
>*---------------
>PRIVATE ln_numfiles, la_dir, lc_updatedir, la_exefile
>lc_updatedir = 'F:\UPDATE\'
>ln_numfiles=ADIR(la_dir,lc_updatedir+'{program name}')
>*&& is the file there?
>IF ln_numfiles > 0
> =ADIR(la_exefile,'{program name}'
> DO CASE
> *&& check date
> CASE la_dir[1,3] > la_exefile[1,3]
> COPY FILE (lc_updatedir+'{program name}' TO '{program name}'
> *&& check size
> CASE la_dir[1,2] <> la_exefile[1,2]
> COPY FILE (lc_updatedir+'{program name}' TO '{program name}'
> ENDCASE
>ENDIF
>
>RUN /n ('{program name}')
>
>*---------
>This checks to see if there is an update each times the program is lanched
>You can even check times - but in Fox2.6 that's a little more difficult. If VFP just make the date and time into a datetime var and check that way. Then this separate program calls the main program you want to run. We do the run because that way in the other program you could change the 'Start' program.
>
>Charles
In addition, this is a good method of moving the latest EXE to the user's C drive for faster loading and less network traffic. We do this quite successfully, and the users only rarely notice the 'copying file' message when they start up.