Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Launch another app
Message
 
To
10/01/2007 12:37:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01184264
Message ID:
01184267
Views:
18
>Suppose you wanted to have a short EXE that launches a second EXE as in the following:
>
>clear
>olddate = fdate('c:\program files\dfds\trp manager\trp.exe',1)
>newdate = fdate('\\tpdfiles\data\dfreeman\applications\trpmanager\trp.exe',1)
>
>if newdate > olddate
>	ans = messagebox("There is a newer version of TRP Manager available. " + ;
>		"Would you like to copy it to your workstation now?",3)
>	do case
>	case ans = 6
>		copy file '\\tpdfiles\data\dfreeman\applications\trpmanager\trp.exe' to ;
>			'c:\program files\dfds\trp manager\trp.exe'
>	case ans = 2
>		cancel
>	endcase
>endif
>
>do 'c:\program files\dfds\trp manager\trp.exe'
>
>
>But you wanted the first EXE to close at the end of the script and leave the second EXE running (trp.exe in this case).
>
>How would you do this?
....
case ans = 6
     lnFle = FOPEN('c:\program files\dfds\trp manager\trp.exe',12)
     DO WHILE lnFle < 0
        MessageBox([Please, Close the applicaton])
        lnFle = FOPEN('c:\program files\dfds\trp manager\trp.exe',12)
    ENDDO
    FCLOSE(lnFle)
    copy file '\\tpdfiles\data\dfreeman\applications\trpmanager\trp.exe' to ;
              'c:\program files\dfds\trp manager\trp.exe'
...
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform