Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compile from batch
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00383993
Message ID:
00384051
Views:
35
Michelle

>The only thing I know about WSH is that you're supposed to turn it off because of the viruses. I'm pretty careful about what attachments I open, though, so I never bothered trying to figure out how to turn it off.

That's a hangover from the Love Bug virus. Personally, I don't think much of that as a solution to the problem. There are rules that email applications can implemnt. Anyway, any attachment you get with the extensions VBS, VBE, JS, or JSE are either script files or encoded script files (the one starting with VB are VBScript, the ones with J are JScript). Never launch them. Save them to the hard drive, right click and select the Edit (not Open) option to see what they say.

>If you could point me to a help file, maybe I could pull it down from above my head. :)

Sure. If you're an MSDN Library subscriber (either through a regular subscription or the year freebie that MS offers registered VFP users) search your hard drive for WSH.CHM (Windows Script Host), SHELLCC.CHM (Shell.Application) and VBSCRIP5.CHM (the VB Script Help).

Additionally, any post from Ed Rauh has references to a number of other sources. If you're looking for a book "The Windows Script Host Programmers Reference" by Dino Esposito from Wrox Press is as good a place to start as any.

Now just to show you how far that wasn't over your head. Here's the script I presented early with comments (the lines beginning with ') and an addition or two.
' Declare the necessary variable
Dim oVFP
' Create the object. Note that the Set statement is required and
' is a holdover from early BASIC.
' This is a VFP 6.0 object and the double quotes must be used
Set oVFP = CreateObject("VisualFoxPro.Application.6")
' Make VFP visible
oVFP.Visible = True
' Execute some VFP Command
oVFP.DoCmd("COMPILE MYPRG.PRG")
Is that so bad?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform