Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WScript Run
Message
De
18/04/2012 11:28:21
 
 
À
18/04/2012 11:25:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01541989
Message ID:
01541990
Vues:
53
>Hi All,
>
>I am attempting to use the Wscript Run command to execute an application. I need the parent application to be suspend or running in the background while the child application is running. The problem is that the Run method of WScript is throwing an error that the application can not be found. But it is there.
>
>
>IF FILE("C:\Program Files\Samsung\PlayCamera\PlayCamera.exe")
>     o=CREATEOBJECT("wscript.shell")
>     o.Run("C:\Program Files\Samsung\PlayCamera\PlayCamera.exe",1,.t.)        <== error OLE error code 0x80070002: The system cannot find the file specified.
>ENDIF
>
>
>Why would I get an error if the EXE exists?


THe space in Program Files.

Either go with PROGRA~1 (I think) or maybe try to use

o.Run('"C:\Program Files\Samsung\PlayCamera\PlayCamera.exe"',1,.t.)

Notice the double quotes wrapped in single quotes.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform