Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distributing an application using
Message
De
26/07/2001 01:50:30
 
 
À
26/07/2001 01:26:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00535533
Message ID:
00535536
Vues:
12
>With the purpose to syncronize the clock of client-machine with the clock of an Windows-NT Server, I´m using the next line in the Main program of my Client/Server application:
>
>RUN 'c:\windows\net time \\srvax /set /yes'
>
>After the Netsetup process, and when the application is executed by a client, an error appears. It seems no client can execute a program with the RUN command.
>
>¿Anybody knows how can I achive this purpose? I'll appreciate your help!!!

You've got the command line syntax wrong:
RUN /N C:\WINDOWS\NET TIME \\SRVAX /SET /YES
Notice, no quotes. It's a WinApp, not a DOS app, so it should be run with an appropriate /N; you can avoid the DOS Window appearing. Also,NET.EXE is not always in the C:\WINDOWS directory (under NT and Win2K, it's in the SYSTEM32 folder), and the syntax does not always support the /YES switch.

On my Win2K box here, it's found in F:\WinNT\SYSTEM32 - I installed Win2K on the F: drive, and there is no \WINDOWS folder at all.

Since it is in the Windows search path, it's best to omit the full path to allow Windows to run it from whereever it is on the Windows system in use.
RUN /N NET TIME \\SRVAX /SET /YES
VFP expects to find a FOXRUN.PIF file to establish the execution environment; failing to include that can cause the RUN command to fail.

You can download my API_APPRUN class from the Files Section; it's a class that permits greater flexibility in executing an external application and is not dependent on the FOXRUN.PIF at all. It also can be used to either launch an app asynchronously, or to wait on the external app to complete before return control to the VFP app.

>
>Enrique
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform