Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Issue with WSH run command within VFP
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Issue with WSH run command within VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Application:
Desktop
Miscellaneous
Thread ID:
01397041
Message ID:
01397041
Views:
122
I'm writing a utility that uses the Windows Scripting Host to run another developer's .NET executable for the sake of leveraging work that was already done instead of having to reinvent the wheel. Here's what the call looks like:
lowsh = CREATEOBJECT("WScript.Shell")
lowsh.Run(lccommand, MINIMIZED_NO_FOCUS, .T.)
lccommand contains the .NET executable file name followed by some command line arguments. The executable itself does exactly what it's supposed to. However, just when it's ready to return control to my VFP utility, I get a VFP error window stating "Cannot Quit Visual Foxpro", followed by a C5 error stating that the OLE object might be corrupt. Execution then continues just fine.

Could someone give me a clue as to what might be going on to generate the first error? Am I doing something wrong with the WSH or should I perhaps be using a different method to launch the .NET app and wait?
Jon Rosenbaum
Devcon Drummer
Next
Reply
Map
View

Click here to load this message in the networking platform